What is MIME type "application/x-ms-xbap"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

The MIME type application/x-ms-xbap is used with XBAP files. These files launch rich Windows Presentation Foundation (WPF) apps directly from a browser on Windows.


The technology uses ClickOnce deployment to install and run apps within a secure sandbox. The apps run with limited system access and rely on the .NET Framework for execution.



More details are available in the Microsoft documentation.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: application/x-ms-xbap    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="application/x-ms-xbap">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'application/x-ms-xbap');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Which web browsers support application/x-ms-xbap?

Native support is essentially limited to Internet Explorer and Microsoft Edge running in IE Mode. Modern browsers like Chrome and Firefox have deprecated the plugin technologies required to run these applications, meaning they will usually download the file rather than execute it.

Why does my XBAP file download instead of running in the browser?

This typically occurs if the web server is not sending the correct application/x-ms-xbap MIME type header, causing the browser to treat it as a generic file. It also happens if you are using a browser that does not support the .NET Framework runtime, such as standard Chrome or Safari.

How do I configure IIS to serve .xbap files?

In Internet Information Services (IIS) Manager, navigate to MIME Types for your site and add a new entry. Set the file name extension to .xbap and the MIME type to application/x-ms-xbap to ensure Windows clients launch the application correctly.

Does the user need specific software to open application/x-ms-xbap content?

Yes, the client computer must be running Windows and have the Microsoft .NET Framework installed. The specific version of the framework must match the version targeted by the WPF application during development.

How do I add support for XBAP to an Apache web server?

You can configure Apache by adding a directive to your .htaccess file or the main httpd.conf. Add the line AddType application/x-ms-xbap .xbap to associate the extension with the correct MIME type.

Is application/x-ms-xbap secure?

XBAP applications generally run in a partial-trust sandbox, which restricts their access to the local file system and registry to prevent malicious activity. However, you should only run these applications from trusted sources, as they execute code via the .NET runtime.

What is the relationship between this MIME type and ClickOnce?

The application/x-ms-xbap type is the entry point for ClickOnce deployment of browser-hosted WPF apps. When the browser processes this MIME type, it triggers the ClickOnce engine to download the application manifest and ensure the latest version is running.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.