Microsoft® SilverlightTM is a cross-browser,cross-platform plug-in for delivering the next generation of .NET based media experIEnces and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX,VB,C#,Python,and Ruby,and integrates with existing Web applications. Silverlight supports fast,cost-effective delivery of high-quality vIDeo to all major browsers running on the Mac OS or windows.
In most cases,hosters do not need to perform particular deployments to support Silverlight. However,check for the following basic items that Could prevent Silverlight from functioning correctly.
MIME Types In windows Server 2008 IIS 7.0All MIME types needed to support Silverlight are implemented by default in windows Server 2008 IIS 7.0 and windows Vista SP1. windows Vista RTM customers can add mime types by running "IIS Manager",clicking on "Mime Types",then clicking "add" and adding the following mime types:
.xap application/x-silverlight-app .xaml application/xaml+xml .xbap application/x-ms-xbapAlternatively,you can add the following mime types to your %windir%/system32/inetsrv/config/applicationHost.config file in the <staticContent> section.
<mimeMap fileExtension=".xaml" mimeType="application/xaml+xml" />
<mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" />
<mimeMap fileExtension=".xbap" mimeType="application/x-ms-xbap" />
To enable IIS 6.0 in windows Server 2003 or IIS7 in windows Vista RTM with the appropriate MIME Types,add:
.xap application/x-silverlight-app .xaml application/xaml+xml .xbap application/x-ms-xbapHere is a VBS script you Could run to enable each of these types:
Const ADS_PROPERTY_UPDATE = 2'
if WScript.Arguments.Count < 2 then
WScript.Echo "Usage: " + WScript.Scriptname + " extension mimetype"
WScript.Quit
end if
'
'Get the mimemap object.
Set MimeMapObj = Getobject("IIS://LocalHost/MimeMap")
'
'Get the mapPings from the MimeMap property.
aMimeMap = MimeMapObj.GetEx("MimeMap")
'
' Add a new mapPing.
i = UBound(aMimeMap) + 1
Redim Preserve aMimeMap(i)
Set aMimeMap(i) = CreateObject("MimeMap")
aMimeMap(i).Extension = WScript.Arguments(0)
aMimeMap(i).MimeType = WScript.Arguments(1)
MimeMapObj.PutEx ADS_PROPERTY_UPDATE,"MimeMap",aMimeMap
MimeMapObj.SetInfo
'
WScript.Echo "MimeMap successfully added: "
WScript.Echo " Extension: " + WScript.Arguments(0)
WScript.Echo " Type: " + WScript.Arguments(1)
If you copy and paste the code above into a VBS file and save it as ADDMIMETYPE.VBS the Syntax to add each type would be:
ADDMIMETYPE.VBS .xap application/x-silverlight-app ADDMIMETYPE.VBS .xaml application/xaml+xmlADDMIMETYPE.VBS .xbap application/x-ms-xbap
Using the IIS Manager User Interface in windows Server 2003 IIS 6.01. Go to Start/administrative Tools and run IIS Manager,see figure below:
2. Right click on the server name and select "PropertIEs",see figure below:
3. In the PropertIEs Dialog,click on the "MIME Types" button,see figure below:
4. In the "MIME Types" Dialog,click the "New" button,see figure below:
5. In the "MIME Type" Dialog enter one MIME Type at the time:
.xap application/x-silverlight-app .xaml application/xaml+xml .xbap application/x-ms-xbapsee figure below:
For detailed information on Silverlight,visit http://silverlight.net/.
总结以上是内存溢出为你收集整理的Configuring IIS for Silverlight Applications全部内容,希望文章能够帮你解决Configuring IIS for Silverlight Applications所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)