A new technology enthusiastic user asked me, how is Silverlight 2.0 released? Hope more friends can solve some problems!
In Version 1.1, silverilght is a DLL file request! After being generated in the Silverlight SDK 2.0 beta for Visual Studio 2008 plug-in of silverlight2.0 and blend 2.5, an xap (read as zap as xap) file appears in the "bin \ debug" directory of the project. This is a compressed file, which does not contain the XAML file you wrote. Instead, it directly generates the DLL and runs it directly by the Silverlight plug-in.
In Silverlight beta 2.0, a group named "Silverlight controls" is added to the ASP. NET tool box. Two controls, "Silverlight" and "mediaplayer", are added to the group ". The source attribute of the Silverlight control specifies the XAML and xap files. This control requires the support of a scriptmanager control. Then you can view the browsing effect directly.CodeYes:
<Asp: scriptmanager id = "scriptmanager1" runat = "server">
</ASP: scriptmanager>
<Asp: Silverlight id = "silverlight1" runat = "server" Height = "283px" Source = "~ /Wpfhomeloading. xap "width =" 600px "/>
You can also directly output HTML-tagged object tags to open the XAML and xap files and Run ActiveX plug-ins in the browser! However, this method is not recommended here, because some browsing operations are not directly related to object or focus activation. The Code is as follows:
<Object Data = "data: Application/X-Silverlight," type = "application/x-silverlight-2-b1" width = "100%" Height = "100%">
<Param name = "Source" value = "wpfhomeloading. xap"/>
<Param name = "onerror" value = "onsilverlighterror"/>
<Param name = "background" value = "white"/>
<! -- If the Silverlight plug-in is not installed, the HTML section displayed by the browser! -->
<A href = "http://go.microsoft.com/fwlink? Linkid = 108182 "style =" text-Decoration: none; ">
</A>
<! -- End -->
</Object>
IIS server and server configuration
Xap and XAML file types are required in Silverlight. If you want to use Silverlight on the IIS serverProgramTherefore, you must register the MIME file types of XAML and xap in IIS. Open IIS> site Properties> HTTP header> MIME type> New:
Extension:. xap
Mime Type: xapapplication/X-Silverlight
Extension:. XAML
Mime Type: Application/XAML + XML