A wide open clientaccesspolicy.xml file for developers

I recently installed some new WCF services on a different domain with SSL.  I was previously running them locally without SSL.  I know that I need a clientaccesspolicy.xml file to allow for cross-domain access.

I copied the one from microsoft here: http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx

But that wouldn't work.    

 

The error I kept getting was:

An error occurred while trying to make a request to URI 'https://api.myservice.com/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 cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

The solution is to explicity add a https://* to the cross domain policy.  This actually is in the above Microsoft link, but I missed it!  I replaced <domain uri="*"/> with <domain uri="https://*" /> and it works now.

This is the file I'm using now.  

 One note: I've also got a domain uri for regular http://.  I don't need http:// access, but it won't work without it.  I am not going to spend time trying to figure that out right now, but I hope this helps somebody.

Scott

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading