近段,开发一个silverlight 项目,想发布到 window 2003 上,发布后,竟只是看到空白页。没有内容。
然后我就在网上找,以为是IIS 配置出现了问题,权限出现了问题。可是搞了快一天了也是没出来。最后,
在一个网站上终于发现了原因。内容如下:
How to Enable Silverlight Support on Windows 2003 Server
Silverlight is a client side technology, which means nothing has to be installed on the Web Server, and it would work regardless of the type of Web Server in use. However, I ran into a small issue when trying to activate the first Silver Light enabled Website in our Hosting environment. The Server must have the MIME types specified for the following file types:
- .xaml = application/xaml+xml
- .xap = application/x-silverlight-app
Once you add these two MIME Types to the Server, Silverlight works just fine.
Adding the MIME Types for Silverlight
In case you need further help on how to add the MIME Types, Here is a screen shot that shows where in the IIS MMC Snap-in you can add them:
Since it is fairly straight forward, I hope no further explanation is necessary. If you add the MIME Types to the root Website, all Websites will have Silverlight enabled rightaway.
The Screen shot is from Windows Server 2003.
this comes from http://www.haiders.net/post/How-to-Enable-Silverlight-Support-on-Windows-2003-Server.aspx