What is MIME type "application/x-silverlight-app"?

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-silverlight-app signals that a file contains a Silverlight application. It informs browsers that the file is ready to be processed by the Silverlight runtime.


Silverlight apps are delivered as bundled packages. They contain code, assets, and resources needed for interactive multimedia experiences. These packages use the file type XAP, which acts like a container for the app’s content.



This MIME type ensures the server and browser correctly handle Silverlight content. For more details, visit Microsoft Silverlight.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: application/x-silverlight-app    
  

HTML

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


    <a href="file.dat" type="application/x-silverlight-app">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-silverlight-app');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the purpose of the application/x-silverlight-app MIME type?

This MIME type identifies Microsoft Silverlight application packages, which typically use the .xap file extension. It instructs the web browser to load the Silverlight plugin (if available) to execute the rich internet application contained within the file.

Do modern web browsers still support application/x-silverlight-app?

No, major browsers like Google Chrome, Firefox, and Microsoft Edge have removed support for the plugins required to run Silverlight. Microsoft officially ended support for Silverlight in October 2021, meaning this MIME type is primarily relevant only for legacy systems using older versions of Internet Explorer.

How do I configure my web server to serve .xap files?

You must register the MIME type to ensure the browser handles the file correctly.

  • Apache: Add AddType application/x-silverlight-app .xap to your configuration or .htaccess.

  • Nginx: Add application/x-silverlight-app xap; to your mime.types file.

  • IIS: Add the extension .xap mapped to application/x-silverlight-app in the MIME Types feature.

Why do I get a 404 error when trying to download a .xap file?

This often occurs on IIS servers because they block unknown file extensions by default for security reasons. Even if the file exists on the disk, the server returns a 404 Not Found error until you explicitly add application/x-silverlight-app to the server's allowed MIME type list.

Can I view the contents of an application/x-silverlight-app file without a browser?

Yes, Silverlight .xap files are essentially standard ZIP archives. You can rename the file extension from .xap to .zip and open it with any compression tool (like Windows Explorer or 7-Zip) to inspect the manifest, DLLs, and resource assets inside.

What are the security risks of using application/x-silverlight-app?

Since Silverlight is End-of-Life (EOL), Microsoft no longer provides security updates or patches for the runtime. Serving or running these files exposes users to unpatched vulnerabilities, so it is highly recommended to migrate content to modern standards like HTML5.

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.