Tags

,

Fixing Error: Unhandled Error in Silverlight 2 Application
Code: 2104
Category: Initializer Error
Message: Could not download the Silverlight application.
Check web server settings.

When you’re hosting Silverlight, you have to tweak your IIS6 or Appache settings to allow the server to know how to handle the extensions that it’s not familiar with. I’m sure in the future, Microsoft will encode this directly into new releases of IIS, but for now, you have to add these MIME types yourself.

.xaml application/xaml+xml
.xap application/x-silverlight-app
.xbap application/x-ms-xbap

To add the MIME types to IIS6:

1. Choose the Virtual Directory or Default Web Site in IIS
2. Open the context menu and choose “Properties”
3. Select the “HTTP-Headers” tab
4. Click the button labeled “File Types…” in MIME Map section
5. Choose “New Type” and type the extension from above into the extension field and the application type into the MIME type field.
6. After adding all 3, click “OK” then click “Apply” on the main menu. You’re done. No restart needed.

Advertisements