Question

We have a strange issue with a silverlight app which seems to centre around the 'clientaccesspolicy.xml' file.

We have a website, which is the default website on IIS7. In the root of this website we have the 'clientaccesspolicy.xml' file.

We also have a web service defined in a 'http://thewebsite/asubdirectory/service.asmx' which handles some of the silverlight requests to the website.

What seems to happen, is that when we try to load the silverlight component, there is an http request for 'http://asubdirectory/clientaccesspolicy.xml' which is clearly wrong.

What's odd, is that if I setup the default website to be blank, and setup this particular website as an application/virtual directory below the default website. e.g. http://thewebsite/subdomain/ then the request for clientaccesspolicy goes to http://thewebsite/clientaccesspolicy.xml and assuming I keep a copy of the file at the root of the default website, things work ok.

What I'd like to know, is how silverlight/IIS is determining that it needs to look further up that the root for the clientaccesspolicy when the website is defined as the default.

Could it be the service location or the service references in silverlight? Is there a sensible way round this?

Many thanks,

Doug

Était-ce utile?

La solution

Silverlight needs to ask target site for cross-domain policy if it is not the same domain. So based on your "http://asubdirectory" I think somewhere your code is wrong and actually tries to use service at http://asubdirectory/someservice location instead of http://thewebsite/asubdirectory/someservice.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top