Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 Code: 2104 Could not download the Silverlight application

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?

like image 557
rotary_engine Avatar asked Apr 03 '10 15:04

rotary_engine


2 Answers

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.

like image 136
Keith Elder Avatar answered Oct 26 '22 23:10

Keith Elder


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")" />
like image 35
CedricB Avatar answered Oct 27 '22 01:10

CedricB