简体   繁体   中英

Cross-Domain Access Error Calling WCF Service from Silverlight

I have a WCF service hosted within a Windows service. Its purpose is to receive uploaded files. I want to be able to upload via a silverlight application. I can connect to the webservice but as soon as i call a method when it returns i get an security exception saying somehing about a crossdomain policy. I got a clientaccesspolicy.xml file, but where do i put it for it to work? And is this really the problem?

It should be noted that the webservice is working as intended i have other clients using it, a winForms application.

You need a clientaccesspolicy.xml file on your server if you're calling the service from Silverlight. It should be located at the root of your website/domain. As an alternative you can run your Silverlight out-of-browser and with elevated permissions (just for testing) - then you don't need the clientaccesspolicy.xml file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM