How To: Deploy a Silverlight application to IIS 6.0 and 7.0
Instructions provided describe the steps to deploy a Silverlight application to Internet Information Services v6.0 and v7.0 (IIS).
- Create a new folder called 'SilverlightApplicationSample' under the wwwroot of the production server.
- Copy the 'ClientBin' folder and paste it under the SilverlightApplicationSample folder. Please note that the ClientBin folder has the *.xap file.
- Copy the file silverlight.js, and paste under the SilverlightApplicationSample folder.
- Copy the web site *.html file and paste it under the SilverlightApplicationSample folder.
- Convert the SilverlightApplicationSample folder to an application. Go to the IIS Manager:
• For IIS 6, right-click the SilverlightApplicationSample folder and select Properties. In the Properties dialog box, click the Create button to create an application.
• For IIS 7, right-click the SilverlightApplicationSample folder and select Convert to Application. In the Add Application dialog box, click OK to create an application.
- Silverlight applications are downloaded by browsers through XAP files. These XAP files are essentially .zip files that contain the assembly manifest file, and one or more assemblies. Therefore, make sure the .xap, .xaml, and .xbap extensions are included in the MIME types for the IIS.
Go to IIS Manager (refer to the images in Step 5, above):
• For IIS 6, right click on the server name and select Properties. In the Properties dialog box, click MIME Types button.
In the MIME Types dialog box, click New button to enter the following MIME types.
• For IIS 7, click on the server name in the left panel. In the right panel, choose MIME Types.
In the MIME Types dialog, click the Add button to enter the following MIME types.
If the above MIME types already exist, there is no need to add them again.