Er. alokpandey's Blog

How to Enable Silverlight Support on Windows 2003 Server

Posted in ASP.NET (C# & VB), C#, SilverLight by Alok Kumar Pandey on December 29, 2010

How to fix Silverlight Error #2104 Could not download the silverlight application

There might be a situation when you receive a message notifying about an error in Silverlight Application code (Error Code 2104 Initialize Error).

This error relates to the IIS settings.

Add MIME types to IIS to resolve.
inetmgr — > select ur silverlight applciation –>Right click Properties –> HTTP Headers — MIME Map –> File Types — New Types –>
Add one by one the below mentioned:
Associated Extension        Content Type(MIME)
.xaml                              application/xaml+xml
.xap                                application/x-silverlight-app
.manifest                         application/manifest
.application                      application/x-ms-application
.xbap                              application/x-ms-xbap
.deploy                           application/octet-stream
.xps                               application/

Silverlight is a client side technology, which means nothing has to be installed on the Web Server, and it would work regardless of the type of Web Server in use. However, I ran into a small issue when trying to activate the first Silver Light enabled Website in our Hosting environment. The Server must have the MIME types specified for the following file types:

  • .xaml = application/xaml+xml
  • .xap = application/x-silverlight-app

Once you add these two MIME Types to the Server, Silverlight works just fine.

Adding the MIME Types for Silverlight

In case you need further help on how to add the MIME Types, Here is a screen shot that shows where in the IIS MMC Snap-in you can add them:

Since it is fairly straight forward, I hope no further explanation is necessary. If you add the MIME Types to the root Website, all Websites will have Silverlight enabled rightaway.

The Screen shot is from Windows Server 2003.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: