Silverlight: Server Requirements
Overview
Hosting Silverlight applications on a web server does not normally require any special configuration. The only real server requirement is to associate the .xap file extension
with the MIME type application/x-silverlight and the ability to serve standard file types such as .html, .js, .xaml, .zip, .dll,
and any media files that are required.
Silverlight MIME Types
The server is required to send the correct MIME type for Silverlight applications to run properly. Otherwise you may experience a case where only an empty white canvas is displayed. Below is a list of the file extensions used by Silverlight and their corresponding mime types.
Required MIME types
| Extension | MIME type |
|---|---|
| .xaml | application/xaml+xml |
| .xap | application/x-silverlight |
Server Configuration
The following lists helpful tips on configuring some of the most popular servers.
| Server | Action required |
|---|---|
| IIS6 | Add MIME types under web site properties, HTTP-Header, MIME Types. |
| IIS7 | No action required. |
| Apache | Use mod_rewrite, or mod_mime with the AddType directive in http.conf and restart Apache.
You may also modify the .htaccess file at the directory level. |
| Lighttpd | Add MIME types using mimetype.assign. |
| Sun Java System Web Server | Add MIME types to the config directory MIME types file. |
| Tomcat | Add MIME types to the %TOMCAT_INSTALL/conf/web.xml file and restart Tomcat. |
| Amazon S3 | Make sure you set the correct MIME type when you upload the file. |
Workarounds
If you are using a hosting plan or working in an environment where you are not able to get the MIME types configured, you can rename your .xap files to
use the .zip extension. You will also need to update any references in your embed code to point to the new filename.
Further Reading
Related information on the web is listed below.

