I have a silverlight application which has some calls to a WCF service. Both silverlight and WCF are located on the localhost. when I run the silverlight application but it fails in the calls to WCF in communication exception. Iv'e understand fron the web that this can be because the WCF and silverlight are not running on the same port and I have to add clientaccesspolicy.xml file. but I didn't understand what is the "domain root" I have to locate there the xml. can you please inform me the path I have to locate the xml there (on localhost)
thanks!
"Domain root" is the root address of the HTTP domain you are hosting the Silverlight app at. This is a bit counter-intuitive, but remember the policy file is dealing with cross-domain scripting issues.
So if for any of these:
You have to have a valid clientaccesspolicy.xml at
An easy test is to hit that url (http://www.yourdomain.com/clientaccesspolicy.xml) from a broswer and ensure you get the access XML back. This will mimick Silverlight's behavior.
If this isn't possible for your hosting setup, please respond. There are other options (custom iis handler, etc) for this request, but depending on your needs they can be overkill.