Tuesday, October 20, 2009 8:03 AMI've got a little problem. My hoster accepted SSL-secured sites via https://sslsites.de/domain_name (where domain_name is my domain). If I put e.g. my app on http://domain.de and startet it, it searches for http://domain.de/clientaccesspolicy.xml. Now I start the same app via https://sslsites.de/domain.de - it startet, but searches for https://sslsites.de/clientaccesspolicy.xml. I can't put the file there. Is it possible to say where to look for the clientaccesspolicy.xml-file? Best regards, Peter
Tuesday, October 20, 2009 2:24 PM
The clientaccesspolicy.xml file or the crossdomain.xml has to be present at the root of the requested target domain.
From the msdn documentation -
If the connection request was from a WebClient or an HTTP class to a cross-domain site, the Silverlight runtime tries to download the security policy file using the HTTP protocol. The Silverlight runtime first tries to download a Silverlight policy file with a name of "clientaccesspolicy.xml" at the root of the requested target domain using the HTTP protocol.
If the "clientaccesspolicy.xml" is either not found (the web request returns a 404 status code), returned with an unexpected mime-type, is not valid XML, or has an invalid root node, then the Silverlight runtime will issue a request for a for the Flash policy file with a name of "crossdomain.xml" at the root of the requested target domain, using the HTTP protocol.
HTTP redirects for the policy file are not allowed. A redirect for a policy file will result in a SecurityException of access denied.
Saturday, July 02, 2011 1:54 PM
In my case, I had the clientaccesspolicy.xml file in place and it still failed. I had to replace the server name with 127.0.0.1 in my WCF URL in the service reference configuration and in the ServiceReferences.ClientConfig. Alternatively, you can just un comment the line:
in the c:\windows\system32\drivers\etc\hosts file and then use localhost as the server name.