I was getting following error when consuming web service in Silverlight application. This was happening because my Web Service is hosted on other domain (in local, it exists in a separate project).
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. Please see the inner exception for more details. To solve this error, create crossdomain.xml in the
web service project root folder file with below content
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-http-request-headers-from domain="*" headers="SOAPAction,Content-Type"/>
</cross-domain-policy>
and you should be able to access this web service from the Silverlight.
Hope this will help.
Thanks
Regards,
Sheo Narayan
http://www.dotnetfunda.com