Amazon.com Widgets

Using Silverlight 2 on a production Web Server

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.

image 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!

Published 14 March 08 10:05 by BradA
Filed under:

Comments

# MSDN Blog Postings » Using Silverlight 2 on a production Web Server said on March 14, 2008 2:53 PM:

PingBack from http://msdnrss.thecoderblogs.com/2008/03/14/using-silverlight-2-on-a-production-web-server/

# Brad Abrams : Using Silverlight 2 on a production Web Server said on March 14, 2008 2:56 PM:

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

# Rob said on March 14, 2008 6:59 PM:

Using Silverlight 2, which is in BETA, on a production web server especially for use by users outside of my company would not be possible.  Beta software is not allowed on production servers and especially ones visible to outside users.

# BenHayat said on March 14, 2008 7:26 PM:

>>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<<

Brad, so why didn't MSFT just use .ZIP to begin with so we wouldn't have to change it back to Zip? Can you suggest to make the extension to Zip rather than XAP?

Thanks!

..Ben

# Community Blogs said on March 15, 2008 6:30 AM:

Silverlight 2 now packs all the files needed to run the application in a XAP file (which is essentially

# Michael Schwarz said on March 15, 2008 1:44 PM:

@Rob: well, when putting Silverlight 2 beta on production web server means that you simple only put a FILE on the web server, nothing different than a TXT file. Silverlight applications will only be executed on the client side, so it is no problem to put any beta Silverlight app on production servers.

Michael

# Using Silverlight 2 on a production Web Server said on March 17, 2008 3:07 AM:

I recently ran into an issue with using Silverl

# SergioTarrillo's RichWeblog said on March 17, 2008 1:25 PM:

ASP.NET, Web Evítate problemas: pon SIEMPRE un nombre de aplicación en Web.config . Una recomendación

# ASP.NET Espanol Blogs said on March 26, 2008 12:26 PM:

ASP.NET, Web Evítate problemas: pon SIEMPRE un nombre de aplicación en Web.config . Una recomendación

# ScottGu's Blog said on April 2, 2008 1:37 AM:

I'll be using this page to link to Silverlight 2 articles and posts (both ones I write as well ones by

# Johan's Avanade Blog said on April 8, 2008 5:41 PM:

Recently, I upgraded my personal blog that contains a little Silverlight animation form Silverlight Alpha...

# 大宋提刑官 said on April 9, 2008 1:01 AM:

Silverlight技巧,诀窍,教程和链接

【原文地址】SilverlightTips,Tricks,TutorialsandLinksPage

我将使用本页链接到有关Silve...

# Mfinanga said on May 29, 2008 10:24 AM:

How can apache differ from IIS

# miguel said on July 11, 2008 3:57 AM:

This is something really easy to do, but can be confusing. Keep in mind SL will be run at the client

# 木野狐(Neil Chen) said on July 21, 2008 10:33 PM:

(以下内容全部整理自博客堂Scottgu博客中文版)Silverlight技巧,诀窍,教程和链接 【原文地址】SilverlightTips,Tricks,...

# Dean Green's Blog said on October 14, 2008 10:18 PM:

Godaddy and Running Silverlight

# truejob said on January 5, 2009 11:18 PM:

Silverlight技巧,诀窍,教程和链接

【原文地址】SilverlightTips,Tricks,TutorialsandLinksPage

我将使用本页链接到有关Silve...

New Comments to this post are disabled

Search

This Blog

Syndication

Page view tracker