Allow the download of Windows Phone XAP files within IIS (avoiding 404 errors)

Allow the download of Windows Phone XAP files within IIS (avoiding 404 errors)

Some months ago I made a couple posts explaining how we can configure IIS to allow the download of Android APK and iOS IPA files:  now, upon request, I'm posting the same thing for Windows Phone XAP files.

When you're developing a Windows Phone App you'll most likely want to give someone - the customers and/or beta-testers, colleagues, etc - an URL pointing to a .xap file containing the efforts of your hard work, which is not (yet) present in the Windows Store. Since the vast majority of web servers (including IIS) don't natively support the .xap MIME-type, your URL will most likely give an apparently odd 404 - Page Not Found error response. In order to overcome the problem you need to add the proper MIME-type corresponding to the .xap file in the following way:

  • Open the IIS Administration Panel (see picture).
  • In the left panel, click to the entry corresponding to your global IIS instance (pt. 1 in picture) so that each modification you'll make will be applied to all your past, present and future web-sites. If you only want to handle the .apk MIME-type for a specific web site, click to the entry corresponding to it instead.
  • In the right panel, Click to the "MIME Types" icon. You will be presented with a listing of all currently supported MIME-types.
  • Click to the "Add..." button near the top-right corner (pt. 2 in picture) and add the following MIME-type (pt. 3 in picture):
    • Extension: .xap (be sure to include the dot)
    • MIME-type: application/octet-stream

ipa-mime-type-iis

(click over the picture to enlarge)

Needless to say, this can be used to allow the download of any other file extension.

If you're not using the IIS Management interface and/or if you want to work directly on web.config level you can achieve the same result by following the comprehensive instruction explained in the official IIS configuration page.

About Dark

Lead Developer, IT Project Analyst, UI Designer, Web Enthusiast. IT Architect for websites, interfaces, services & apps built for web & mobile devices. Microsoft MVP for Development Technologies since 2018.

View all posts by Dark

2 Comments on “Allow the download of Windows Phone XAP files within IIS (avoiding 404 errors)”

  1. Pingback: Allow the download of APK files within IIS (avoiding 404 errors)
  2. Pingback: Allow the download of APK files within IIS (avoiding 404 errors)

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.