Register XAP file extention in IIS

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.

Xap MIME TypeMIME type in IIS 7


14 comments so far

  1. Al on

    Thanks! I had almost given up getting the Silverlight 2.0 beta app to show up after publishing.

  2. […] Register XAP File Extension in IIS (Corey Schuman) […]

  3. .net noobie on

    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… 😉

  4. Kinga on

    Does it work also on IIS 6? Because you mentioned IIS7…
    Thank you,

  5. Felix on

    typo: application\x-silverlight-app should be application/x-silverlight-app.

  6. cschuman on

    Thanks Felix, updated the typo.

  7. Dmytro Mindra on

    Thank you for information! Yes, it works on IIS 6. I hope that guys from Microsoft will fix this issue.

  8. […] 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 […]

  9. […] 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) […]

  10. bill staples on

    Here are instructions for IIS6 and IIS7, with scripts:

  11. […] and  handler mappings were not configured for Silverlight and WCF. How to fix the mime type is here and the handler mappings, […]

  12. Sambo on

    Great point, thank.

  13. Felipe Alba on

    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

  14. Drogna on

    Finally, a simple and easy to follow tip which works

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: