A taste of development

March 21, 2008

Using Silverlight 2 on a production Web Server

Filed under: Technology —Tagged , , , — simma1990 @ 7:00 pm

Also see: CVS on the Web

Also see: I’ve finally settled into my new position on the Internet Explorer team…

Also see: The Internet is Officially Dead & Boring – Its the economy stupid !

I recently ran into an issue with using Silverlight 2 on a production web server.   Basically the Silverlight 2 application worked great on my dev machine, but when hit from the production web server I found the page has the Silverlight control, but just a white canvas, nothing else.

The problem was that the web server was not set up to handle the.xap file extension that Silverlight 2 uses to encapsulate the code for the application. 

A few options for fixing this issue:

1. For IIS6, simply add the.XAP filetype.

2. For II7, this should just work as IIS7 enables them all by default.

3. Other web services such as Apache, lighttpd, etc.  Just make sure the server is configured to allow access to.xaml,.wmv and.xap files and you should be all set

4.  Sometimes you can’t easily go in and change the setting on the server.   So the solution I actually used was none of these.  I just renamed the.XAP file to.ZIP, changed the reference in my applications.Xaml file and it ran fine! 

 

Hope that helps!


http://blogs.msdn.com/brada/archive/2008/03/14/using-silverlight-2-on-a-production-web-server.aspx

©2012 A taste of development
Provided by WPMU DEV -The WordPress Experts
Hosted by Edublogs.org