Overcoming Silverlight Cross Domain Access Restrictions
Check out this article and learn how to overcome Silverlight Cross Domain Access Restrictions.
Description
HTML pages cannot communicate or exchange data with the WEBfactory 2010 web services. The WEBfactory 2010 log file viewer will show an error message like the following:
An error occurred while trying to make a request to URI 'http://localhost:15511/anyService/Service.asmx'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent.
Cause
When Silverlight accesses web services remotely it often causes a cross domain access problem preventing the HTML page from communicating with the WEBfactory 2010 web services and exchange data with them. The main cause is the high security setup of Internet Explorer.
Solution
Add the web server on which the web site runs in the Trusted Sites list of Internet Explorer:
Enable cross domains data access:
Open Internet Options from Internet Explorer > Tools or Control Panel > Network and Internet > Internet Options.
Click on the Security tab and select Trusted sites from the Select a zone to view or change security settings menu.
Click on the Sites button to open the Trusted sites list. Type the address of the web server that runs the web site in the Add this website to the zone text field. Click Add to add the web server.
Close the dialog and confirm the changes in the Internet Options window by pressing Apply.
Enable cross domains data access:
In Internet Options > Security tab, click the Custom level... button under the Security level for this zone section.
Scroll down the Settings list to the Miscellaneous section. Enable the Access data sources across domains option.
Confirm the Trusted Sites Zone dialog and click OK or Apply in the Internet Properties window.