Silverlight looking for invalid url for clientaccesspolicy file

I have a silverlight app connected to a web service via https.

The web service is hosted at mydomain.com (not localhost).

When I run silverlight it makes https calls to the webservice at mydomain.com but also tries to access http: //localhost/clientaccesspolicy.xml "and obviously fails. Why is my SL app looking for cal.xml on localhost ? why isn't it looking for cal.xml in mydomain.com?

Appreciate your thoughts.

Thank!

+2


source to share


2 answers


"Before allowing a connection to a network resource, the Silverlight runtime will try to load a security policy file from the domain that hosts the network resource. There are two different methods used to load the security policy, depending on whether the connection request was from the WebClient class or HTTP or a socket connection request was requested If the connection request was from a WebClient or an HTTP class in a cross-domain site, the Silverlight runtime tries to load the security policy file using the HTTP protocol. The Silverlight script first tries to load a Silverlight policy file named "clientaccesspolicy. xml "at the root of the requested target domain using the HTTP protocol. If" clientaccesspolicy.xml "either not found (web request returns 404 status code) returned with an unexpected mime type, invalid XML, or has an invalid root node, then the Silverlight runtime will issue a request for a Flash policy file named "crossdomain.xml" at the root of the requested target domain using the HTTP protocol ".



http://msdn.microsoft.com/en-us/library/cc645032%28VS.95%29.aspx

0


source


What does the address look like inside your SL application? Address coming from ServiceReference.ClientConfig file? If so, make sure it has mydomain.com and not localhost.



0


source







All Articles