Don’t feel desperate if you walk into some exception message like this:
“An error occurred while trying to make a request to URI ‘http://localhost:1528/MyService.svc’. 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 …….. etc. etc. etc.”
Just paste the following into an XML (name it: ‘clientaccesspolicy.xml’ ) located in the root of your service application:
<?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy>
In fact you can do more with policies on crossdomain-issues. Please read:
msdn on this topic
Sajai’s blog
