VS2010 Code: 2104 Could not download the Silverlight application
Solution 1
I just got this error myself. Looking at source control and my project I noticed that the original test pages that were created when I setup the project got replaced by two new test pages (one .aspx and one .html).
I removed the newly created pages and went back to the old test pages and things started working.
If your situation isn't the same as mine, then just check your silverlightControlHost div in your test page and make sure you are pointing to the correct .xap file and runtime.
Solution 2
Follow the Step :
On Hosting project, Properties > Silverlight Applications > Add..
This solved my Problem. Simple error.
Solution 3
if youre not running in IIS then just check your silverlightControlHost div in your test page and make sure you are pointing to the correct .xap file and runtime.
If you were in MVC you could do something similar...
<param name="source" value="@Url.Content("~/ClientBin/NameOfYourSlAppGoesHere.xap")" />
Solution 4
I had the same error with my provider. When I looked at the MIME type everything seemed to be OK:
.xap => application/x-silverlight-app
which seems to be the default value on IIS 6. Then I looked at the webpage VS 2010 created and noticed that it has a MIME type of
application/x-silverlight-2
I changed the MIME type on IIS according to the webpage's type and - my silverlight application gets loaded without any error!
Solution 5
.xap file was not getting copied to ClientBin directory
Related videos on Youtube
rotary_engine
Updated on July 19, 2020Comments
-
rotary_engine almost 4 years
I've just started getting this Javascript error running VS2010 with SL4
Error: Unhandled Error in Silverlight Application Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. Check web server settings
Everything was working fine, changed 1 line of code to use a RegularExpression in the web project (using the Silverlight Business Application template) then when rebuilding I get this error.
Google says this is IIS and mimetype related. I'm using Cassini not IIS with VS2010.
Rebooted, cleared xap from IE cache. Error on both IE and FF.
What could be wrong?
-
C. Ross over 13 yearsI'm having the same problem, and the file does attempt to download. What's the next step?
-
Morten Christiansen almost 13 yearsThe same solution helped me. The strange thing is, though, that changing it back did not reintroduce the problem. In other words, it seems to be a temporary problem (and only for a specific Silverlight control).
-
Mr AH almost 12 yearswow.. I made the mistake of "/" instead of "\" for path to define the value of the xap source location. If yer not using the default "ClientBin" then you might fall into this trap too (who knew!?)