Chapter 10: Designing Silverlight Applications

297

Figure 10-8 Executing an OOB application

Deploying Silverlight Applications

You can deploy a Silverlight application to a Web site, as you would an ASP.NET MVC application. However, you’ll need to ensure the MIME type and policy is in place to ensure the application will run outside of your development environment.

If you’re running IIS 7, Silverlight will already be set up. However, if you’re deploying to an IIS 6 server, you must set the MIME type for *.xap files to application/ x-silverlight-app as described in the following steps:

1.Open Administrative Tools Internet Information Services (IIS) Manager.

2.Under Web Sites, in IIS, right-click on the Web site for your Silverlight application and select Properties.

3.Click the HTTP Headers tab, click MIME Types, and click New.

4.Type .xap as the Extension and application/x-silverlight-appas the MIME type.

Click OK three times to close all windows and close IIS.

Additionally, you must have a policy file in the root folder of your Web site. There are two types of policy files you can use: crossdomain.xml or clientaccesspolicy.xml.

Page 320
Image 320
Microsoft 9GD00001 manual Deploying Silverlight Applications, 297