Silverlight Tip of the Day #71 – New Silverlight 2 Web Site Clean Up Check List
When creating a Silverlight application with a web site there are a number of cleanups you will want to perform. I have created a little check list here that I will maintain and update as I get new ideas.
- Change the Page Title. By default the title is set to your application name. Most likely, this is not what you will want. Open up your web page (I.e. default.aspx) and change the name in the <title></title> tags.
- Minimum Version. If you have a Silverlight 2 web site you created prior to installing the RTM version make certain to update your Minimum version of your Silverlight control in your web page to MinimumVersion="2.0.31005.0.”
- HTML. IIS Servers are setup by default to look for default.htm. If you use default.html to host your Silverlight app, change the extension to “.htm”.
- Error Message. If you use the HTML file to host your Silverlight app, change the error message form "Unhandled Error in Silverlight 2 Application" to something more specific to your site. The same thing applies to your App.xaml.cs ReportErrorToDOM() function.
- Install Experience – Create a custom experience for users who do not have Silverlight installed. See Tip of the Day #38 for an example on how to do this.
- MIME Type. If you are hosting your application on your server, open IIS and make certain you have the XAP extension registered to “application/x-silverlight-app”. See Figure 1.1 for an example.
Figure 1.1. XAP Mime Type Registration
Thank you,
--Mike Snow
Subscribe in a reader