<object id="SL" data="data:application/x-silverlight," type="application/x-silverlight-2" style="width: 550px; height: 280px"> <param name="source" value="https://sites.google.com/site/rajganeshmountbatton/home/blogspotdocuments/25SquarePuzzle.xap" /> <param name="minRuntimeVersion" value="3.0.40624.0" /> <param name="enableHtmlAccess" value="true" /> <param name="initParams" value="someParam=value" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration: none;"> <img src="http://go.microsoft.com/fwlink/?LinkId=108181" style="border-style: none" alt="Get Microsoft Silverlight" /> </a> </object>
The solution is to map proper XAP MIME Type, adding few changes in AppManifest.xml file and adding the below param tag inside the object tag as shown below.
Below code block is the change to be done in AppManifest.xml file.
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ExternalCallersFromCrossDomain="ScriptableOnly"> <Deployment.Parts> </Deployment.Parts> </Deployment>
Param change in object tag
<param name="enableHtmlAccess" value="true" />
Here is good post about embedding SilverLight in app engine. I followed the same and hosted my application in app engine. Then changed the source attribute in the object tag to the app engine URL. What a surprise, the application worked like charm.
Below is the code after hosting in the Google App Engine.
<object id="SL" data="data:application/x-silverlight," type="application/x-silverlight-2" style="width: 550px; height: 280px"> <param name="source" value="http://rajganeshsilverlight.appspot.com/25SquarePuzzle.xap" /> <param name="minRuntimeVersion" value="3.0.40624.0" /> <param name="enableHtmlAccess" value="true" /> <param name="initParams" value="someParam=value" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration: none;"> <img src="http://go.microsoft.com/fwlink/?LinkId=108181" style="border-style: none" alt="Get Microsoft Silverlight" /> </a> </object>
2 comments:
Nice. I will use same for my silverlight post in my blog. Thanks to share useful information.
its really fantstci,hats off to you sir ji.
Post a Comment