VS2010 Code: 2104 Could not download the Silverlight application

rotary_engine picture rotary_engine · Apr 3, 2010 · Viewed 22.7k times · Source

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?

Answer

Keith Elder picture Keith Elder · May 3, 2010

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.