Power BI

Content by Charles Sterling

Getting IIS to Serve XPS documents

Most of the morning i have been playing with some of the OpenXML functionality -specifically XPS documents and wanted to share my creations. 

Unfortunately after dropping my new creation in the WWWroot directory of the team webserver and pointing my browser to the file i received a 404 “The page cannot be found error”.

…hmm since i just put the file there i knew this error was in error!  After a couple seconds of sleuth work turns out you must register the MIME types and file extensions so that the browser on the client’s system can load the correct handler.

To do this:

  1. Right-click Default Web site and select Properties from the context menu.

  2. Select the HTTP Headers tab and click “Mime Types” > “New” and the extension


With the mime type of:


You can see i also added the extensions for XBAP applications as well…

For more information on this see the article:

How to: Configure IIS 5.0 and IIS 6.0 to Deploy WPF Applications




(pasting in the 404 error below)

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Please try the following:

  • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
  • If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
  • Click the Back button to try another link.

HTTP Error 404 – File or directory not found.
Internet Information Services (IIS)

Technical Information (for support personnel)

  • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
  • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.