This project has moved. For the latest updates, please go here.

Can this control be hosted in MVC web app?

Dec 13, 2011 at 9:40 PM

I am unable to make it work in MVC web app other than in home page.

Any time I access page (/view) using the routing URL, this control doesn't load.

If there is any sample/guidance to make it work, greatly appreciated.

Dec 13, 2011 at 9:44 PM

The control can work in any type of website. MVC is no problem.

You should check at which location you are trying to access the XAP file from your server. You can use Fiddler for that.
Maybe you have to modify the path to the control/XAP-file so it's able to load the Silverlight Multi File Uploader from the correct location.

Modify this line:
 <param name="source" value="ClientBin/mpost.SilverlightMultiFileUpload.xap" />

Dec 13, 2011 at 9:49 PM

Yes, I have all the init params setup correctly.

It works with the default route (Index.cshtml is configured in Global.asax).

However if I specify route explicitely for same page (index.cshtml) control doesnt load.


Dec 13, 2011 at 9:52 PM

When you have the control at the root, this will be the location of the XAP file: + ClientBin/mpost.SilverlightMultiFileUpload.xap =

If you're in another view, this will become the location: + ClientBin/mpost.SilverlightMultiFileUpload.xap =

That's wrong.

Change this line:
<param name="source" value="ClientBin/mpost.SilverlightMultiFileUpload.xap" />

To this:
<param name="source" value="/ClientBin/mpost.SilverlightMultiFileUpload.xap" />

Dec 13, 2011 at 9:55 PM

Awesome, it worked. Great help and really appreciated.