0
votes

I am moving my Silverlight applications to a new server. The Silverlight application calls a wcf service. I get an error the first time I call the wcf service. The error is:

An error occurred while trying to make a request to URI 'http://deviis202/wcfITGEPS/svcITGEPS.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.

It works ok if I use the wcf service locally.

I googled the problem I it says to look for the clientaccesspolicy.xml and the crossdomain.xml. These are shown below. Then look ok to me.

clientaccesspolicy.xml

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="SOAPAction">
        <domain uri="http://*" />
        <domain uri="https://*" />
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

the crossdomain.xml

<?xml version="1.0" encoding="utf-8" ?>
<cross-domain-policy>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

Any hints will be appreciated.

1

1 Answers

0
votes

The answer was simple, I needed to post the clientaccesspolicy.xml and the crossdomain.xml at the base. In my case at C:\inetpub\wwwroot.