0

I am getting the following error while trying to access a custom webservice from an InfoPath form to fetch some data. I have already gone through the actions described in the error message, but the problem still persists.

A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.

If this form template is published to a SharePoint document library, cross-domain access for user form templates must be enabled under InfoPath Forms Services in SharePoint Central Administration, and the data connection settings must be stored in a UDC file in a data connection library in the same site collection.

If this is an administrator-approved form template, the security level of the form must be set to full trust, or the data connection settings must be stored in a UDC file by using the Manage data connection files option under InfoPath Forms Services in SharePoint Central Administration.

A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.

1
  • How are you publishing the form? Where is the webservice located?
    – Hinek
    Commented Apr 16, 2013 at 15:15

1 Answer 1

0

So you have ensured that the "allow cross domain connection" setting in Central Admin is ticked.

If you are behind a proxy server, you will need to add this to your web.config of your SP web application:

<system.net>
    <defaultProxy>
      <proxy proxyaddress="http://myproxy" bypassonlocal="true" />
      <bypasslist>
        <add address="mycustomwebservice.com" />
         </bypasslist>
    </defaultProxy>
  </system.net>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.