If you are having problems loading a Silverlight 2.0 application, and you have exhausted all options, you may need to register the XAP file extension in IIS. I banged my head against the wall (well, not really) trying to figure out why my application wasn’t loading. It turns out to be a simple fix. Register the MIME type for .xap to application/x-silverlight-app.
Below are screen shots of where to find MIME type in IIS7.





March 7th, 2008 at 5:02 pm
Thanks! I had almost given up getting the Silverlight 2.0 beta app to show up after publishing.
March 8th, 2008 at 2:52 pm
[...] Register XAP File Extension in IIS (Corey Schuman) [...]
March 15th, 2008 at 6:25 am
This also had me stummped for a while, thanks for the info, I have a shared hosting account to play with this stuff and the support guys there also had no idea…
ok, Thanks again
Eat Well, Be Happy and Live Long…
March 20th, 2008 at 7:16 am
Hi,
Does it work also on IIS 6? Because you mentioned IIS7…
Thank you,
Kinga
March 31st, 2008 at 3:34 am
typo: application\x-silverlight-app should be application/x-silverlight-app.
March 31st, 2008 at 12:05 pm
Thanks Felix, updated the typo.
April 11th, 2008 at 11:46 am
Thank you for information! Yes, it works on IIS 6. I hope that guys from Microsoft will fix this issue.
April 25th, 2008 at 2:17 am
[...] blog (inc. screenshots). Note that if your web server is on IIS (prior to version 7) you need to register that MIME type. As an aside, my web server happens to be Apache (shocking I know!) and I had to configure nothing [...]
June 30th, 2008 at 6:31 pm
[...] Como agrgar una extensión mime a su servidor web (si es que reciben un error de archivo no encontrado al tratar de descargar el archivo .xap) [...]
July 9th, 2008 at 6:17 am
Here are instructions for IIS6 and IIS7, with scripts: http://learn.iis.net/page.aspx/262/silverlight/
July 16th, 2008 at 4:00 pm
[...] and handler mappings were not configured for Silverlight and WCF. How to fix the mime type is here and the handler mappings, [...]
August 12th, 2008 at 9:42 am
Great point, thank.
September 10th, 2008 at 7:54 pm
Hi, Im having troubles with silverlight, I can’t download the .xap, I have tried everything, the mime types, changing the extension of the .xap file to .zip or .dll, and it doesn work.
Please help
September 22nd, 2008 at 4:25 pm
Finally, a simple and easy to follow tip which works
November 11th, 2008 at 2:56 pm
[...] NOTE: If you are using Version 1.2 and see an empty Silverlight box instead of the actual gallery, make sure your web server is configured for .XAP files. It should work out of the box on Windows Server 2008, but older servers may need to have the Silverlight 2.0 XAP mime type added to IIS configuration. Click here for instructions. [...]
January 8th, 2009 at 3:41 pm
[...] a commenter on Kevin’s site pointed to this article, which explains how to map the .xap extension used by zipped Silverlight 2 apps to the correct MIME [...]
February 2nd, 2009 at 9:20 pm
[...] xap mime type wasn’t added to IIS. Once I realized this, a quick search on google yielded the solution and a minute in IIS was all it took to move to the next [...]
March 28th, 2009 at 6:40 pm
Hello!
Very Interesting post! Thank you for such interesting resource!
PS: Sorry for my bad english, I’v just started to learn this language
See you!
Your, Raiul Baztepo
June 16th, 2009 at 12:27 pm
That worked for me. Thanks
September 30th, 2009 at 12:22 pm
Worked great. I needed to restart AppPool before it took effect.
January 5th, 2010 at 7:18 pm
Hi there, I like your blog alot, it s has very nice content, I found it while I was searching for web hosting on bing. Thanks for sharing all this info, keep up the good work you do here.