How to solve Unhandled Error in Silverlight Application Code: 2104
I've found that I get this error every time I upload a Silverlight application to a new webserver. IIS does not have the correct settings by default.
The Problem: You ftp a Silverlight App to an IIS website, go to the website in a browser, and get the following error:
The Solution: Open IIS on the server, go to HTTP headers, click on Mime Types, click "Add New" and add the following:
Extension - Mime Type
.xaml - application/xaml+xml
.xap - application/x-silverlight-app
.xbap - application/x-ms-xbap
Hit Apply and your application will load!
The Problem: You ftp a Silverlight App to an IIS website, go to the website in a browser, and get the following error:
Message: Unhandled Error in Silverlight ApplicationThe Cause: The Silverlight Mime types (.xaml, .xap and .xbap) are not listed in that websites registered mime types, therefore IIS will not send those files to the browser.
Code: 2104
Category: InitializeError
Message: Could not download the Silverlight application. Check web server settings
The Solution: Open IIS on the server, go to HTTP headers, click on Mime Types, click "Add New" and add the following:
Extension - Mime Type
.xaml - application/xaml+xml
.xap - application/x-silverlight-app
.xbap - application/x-ms-xbap
Hit Apply and your application will load!
Labels: HowToFix, IIS, Mime Types, Silverlight
2 Comments:
Thank u so much for your solution, it solves my problem, which i am facing from 2 days.
By Pavan Kumar, At November 25, 2009 at 4:34 AM
You're quite welcome, that is an odd error without an obvious solution. Look for more solutions in the future!
By Steve, At November 25, 2009 at 10:41 AM
Post a Comment
Subscribe to Post Comments [Atom]
<< Home