Home Articles My Account Messages Tools Join
Tech Blog, ASP.Net, VB.Net, C#.Net, Programming Help, Help Guide
StellarPC.com | Fixing Error 2104: Could not download the Silverlight application. Check web server settings. (Silverlight)
Fixing Error 2104: Could not download the Silverlight application. Check web server settings. (Silverlight)
Written by: Justin Rich

Fixing Error 2104: Could not download the Silverlight application. Check web server settings.

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.

To do this in Apache 2.2: Using mod_rewite or mod_mime with AddType

1. Open httpf.conf in your favorite text editor
2. Search for <IFModule mime_module>
3. Add AddType application/xaml+xml .xaml + all the other types above
4. Close and save the httpd.conf file
5. Gracefully restart Apache - apacectl restart or /etc/init.d/apache restart

If you're just a user getting this message from a website... it's nothing you can fix, so if you can, get ahold of the website's support staff to fix the issue.

BUG NOTE: MIME types seems to disappear when you upgrade the .NET Framework to 3.5 so you may have to reset these when/if you upgrade to 3.5.


New Post Next 50 | Previous 50
Post# Subject: Posted By: Time:
New Post Next 50| Previous 50