Click here to Skip to main content
15,921,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Friends
I have made a wcf application and its running in my http://localhost/wavservice/Service1.svc

But when I run my asp.net application which contains this service reference
gives me this error.
I seen this error at first time. not getting which policy file should i include or what?

Communication Exception:

An error occurred while trying to make a request to URI 'http://localhost/wavservice/Service1.svc'. 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.

Thanks
Posted
Updated 9-Jan-12 21:04pm
v2

Create clientaccesspolicy.xml file at the root of your web application host service as:

XML
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource include-subpaths="true" path="/"/>
      </grant-to>
    </policy>
  </cross-domain-acc
 
Share this answer
 
Hi,

You should include the policy files, clientaccesspolicy.xml and crossdomain.xml files.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900