By default when you deploy a Silverlight application to an IIS 6.0 server and try to load the page, you will get a JavaScript error:
Error: Unhandled Error in Silverlight Application
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
To fix this:
- Open IIS 6.0 Manager
- Right click the web site that will host the Silverlight app and click Properties
- Click the HTTP Headers tab and select File Types in the MIME Map section
- Click New Type and add the following 3 MIME types for Silverlight
Extension Content Type .xap application/x-silverlight-app .xaml application/xaml+xml .xbap
application/x-ms-xbap