WCF, Silverlight: clientaccesspolicy.xml not found

I am trying to connect a Silverlight application to a WCF service in which I host myself. I created the clientaccesspolicy.xml file and placed it in the root of the service host project, but when I try the service, my http sniffer says it cannot be found. Specifically, the file he is looking for is http: // localhost: 8080 / clientaccesspolicy.xml .

I start the server and the silverlight application in debug mode in Visual Studio 2010. Do I need to place the file somewhere else?

+4
source share
2 answers

I do not understand how you host your WCF service?

Is it hosted in an asp.net application or a Windows host (self-hosting)? If this is the case, you may have to run a client-side client service, which upon request provides the contents of the clientaccesspolicy.xml file.

For example, for example this .

+2
source

The clientaccesspolicy.xml file must be located in the root of the domain in which the service is hosted. You may already have this, but the virtual path of the website or web application from the properties page will need to be changed to "/"

See this page for more information.

+3
source

All Articles