0
votes

An error occurred while trying to make a request to URI 'http://localhost:42083/Services/MyService.asmx'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

And the most peculiar thing about is that before it worked just fine, but when I changed just a little thing in a stored procedure it throws this exception. That's weird! I'm getting a little more suspect against SOAP services for now. Anybody who has any ideas?

1
Can you put up a fiddler session to see if the change you've made did not end up trying to contact external endpoints? And recheck your cross-domain policy files. Maybe they disappeared because some re-compilation action ... - kroonwijk
I can't seem to find any crossdomain.xml file. Maybe I should create one manually? - marko
I got tired of this errors. I'm switching to do webclient and parsing xml files instead. Much more low level but a lot more reliable I think. - marko
When I put the Services folder with the webservice and the clientaccesspolicy file under the ClientBin folder it all worked like a charm. ??? I thought of serving it like a relative source. Seems like it worked. - marko

1 Answers

1
votes

After having read you comment, please make sure you have deployed a cross-domain policy file. Tim has a great blog about it: http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx. It is really an essential asset to obtain when starting SL to server communication.

Hope that helps.