Thursday, November 21, 2013

SharePoint 2013: InfoPath 2013 - Enabling Cross Domain Data Access

During the process of upgrading an InfoPath 2007 form to InfoPath 2013 (2010) and publishing to a staging environment, I received an error when attempting to open a new form:

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

The reason this happened in my case was because the form was published to staging but the data connections within the form all point to production. For this process, it was safe for me to allow cross-domain access.

To resolve this problem, navigate to Central Administration and click on the General Application Settings. Under General Application settings click on Configure InfoPath Forms Services:


 
Scroll down on the settings page and locate Cross-Domain Access for User Form Templates:
 



Simply check the box and click OK:



That's it! Your form should now be allowed to use data connections that may exist on a different farm.
 

9 comments:

  1. Steve,
    Did you have rebuild your form or did the message go away after you changed the "cross domain data" setting to enable?
    I am still getting the same error message.

    ReplyDelete
    Replies
    1. I believe the message just went away after I changed the setting. Make sure your data connections are stored in a UDC file on the same site collection as your form library.

      Delete
  2. Thank you Steve. I ran into this problem after doing a data connection to a web service but this solved the problem.

    ReplyDelete
  3. I am doing this solution but still i am getting same error.

    ReplyDelete
  4. how to use this for central administration for sharepoint online

    ReplyDelete
  5. I am not sure off-hand. I need to get back into SPO.

    ReplyDelete
  6. I'm wondering the same; how do you apply this fix to SharePoint online where there is no settings for cross domain problem.

    ReplyDelete

Matched Content