How do I access a Silverlight XAP file across a domain?
cross-domain, silverlight
Solution
When Silverlight requests a .XAP file cross-domain, the content type must be: application/x-silverlight-app. Also, you need a cross-domain policy file on the other domain. gl
Problem
I'm trying to add my Silverlight application that lives on one subdomain to a web page in another subdomain. For some reason this just plain isn't working ... my Silverlight application is loaded as such in a page on http://subA.domain.com/somepage.html: ``` <div id="silverlightControlHost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="800px" height="600px"> <param name="source" value="http://subB.domain.com/SilverlightApp.xap" /> <param name="onerror" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="2.0.31005.0" /> <param name="autoUpgrade" value="true" /> <param name="enableHtmlAccess" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"> <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /> </a> </object> <iframe style='visibility: hidden; height: 0; width: 0; border: 0px'></iframe> </div> ``` If I move SilverlightApp.xap to subA.domain.com, it loads perfectly. What steps are needed to access a XAP file across domains?? I've been scraping the net trying to figure this out and seem to be getting nowhere. Thanks!!