<div> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="silverlight-plugin" style="height:300px; width: 300px;"> <param name="source" value="http://126.96.36.199/silverlight/ClientBin/SilverlightApplication1.xap"/> url of the server where xap file is hosted <param name="windowless" value="true"/>
<param name="onError" value="onSilverlightError" /> <param name="background" value="Black" /> <param name="minRuntimeVersion" value="4.0.50524.0" /> <param name="autoUpgrade" value="True" /> <param name="enablehtmlaccess" value="true" /> <param name="initParams" value="MyParameter=123,Value=123abc," /> <p> You need to install Microsoft Silverlight to view this content. <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration: none;">Get Silverlight!<br />
<img src="http://go.microsoft.com/fwlink/?LinkID=108181" alt="Get Microsoft Silverlight" style="border-style: none;" /></a></p> </object> <iframe style="visibility: hidden; height: 0; width: 0; border-width: 0;"></iframe> </div>
Issue facing while consuming a xap file
if you are using the above code and you are not able to bind the component only an area is highlighted of the above mentioned height and width
in my case style="height:300px; width: 300px;" .
you should check the following thing
1) the url of the xap file is ok and when you paste in browser , it should start download like pdf or any other doc file.
if its not like that check for the url.
2) if the above line is ok check your firewall for that particular IP. it should not be block on your network.
3)You must have silverlight installed on your browser
if all the case are fine and still you are facing the same problem then problem is only with your hosting server. any googling is not going to help you out any more
<param name="enablehtmlaccess" value="true" />
In my next article i will show how to code and deploy a xap file and solve the above issue of cross domain hosting