Home » General, Programming / Coding

unhandled error in silverlight application code 2104 category:initialize – Silverlight in IIS

27 July 2010 7,168 views One Comment

When you’re hosting Silverlight, you have to tweak your IIS settings to allow the server to know how to handle the extensions that it’s not familiar with.

In IIS you have to add these MIME types.

.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.

In more recent versions of IIS, process is little different, but I am sure you got the idea how to do it.

From Webcosmo Webmaster Forum http://www.webcosmoforums.com/asp/21242-unhandled-error-silverlight-application-code-2104-category-initialize-silverlight-iis.html

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

One Comment »

  • Santosh said:

    that was very helpful thank you

    but the website is unable to connect to oracle
    am am using .svc(wcf service) to connect

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.