To help others who have this problem and don’t want to use IFrames, see the link as it solved my problem. Despite the fact that the author refers to Silverlight 2, he solved my problem in Silverlight 3. In case the link goes down, there are two things that I need to do:
- In the Silverlight application, edit AppManifest.xml to add the following:
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ExternalCallersFromCrossDomain="ScriptableOnly">
- If you use HtmlPage in your Silverlight application (for example, when reading the QueryString submitted to the hosting page), you should also add:
<param name="enableHtmlAccess" value="true" />
silverlight object on the hosting page.
Please note that this is due to security implications, and I cannot help but think that is why Microsoft is not going to distribute this information. However, in my case, I do not have the Silverlight elements available for scripting, and since I wrote the silverlight application, I have no problems with the hosting page that allows the Silverlight application to be available to it.
While studying this issue, I noticed that this problem and the corresponding solutions are confused with a separate problem - the silverlight xap problem accessing the wcf service across domain boundaries. This problem requires the clientaccesspolicy.xml file located in the root directory of the website hosting the wcf service.
Thus, it is possible for the 1st site to access the xap file on the 2nd site, which accesses the data service on the third site, for maximum flexibility and reuse.
Roy McDonough
source share