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
and any media files that are required.
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.
The following lists helpful tips on configuring some of the most popular servers.
|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
|Lighttpd||Add MIME types using
|Sun Java System Web Server||Add MIME types to the
|Tomcat||Add MIME types to the
|Amazon S3||Make sure you set the correct MIME type when you upload the file.|
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
.zip extension. You will also need to update any references in your embed code to point to the new filename.
Related information on the web is listed below.