Friday, February 24

SharePoint/InfoPath cross-domain submission issue

When you use InfoPath to design a form for data submission to a wcf service (or web service) and host it in a SharePoint form library, you may get the following error when trying to submit the form data to a service hosted within the same domain:
"The form cannot be submitted 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"

This issue is a cross between the way InfoPath stores URL information in your data connections and the way SharePoint resolves URLs.

The most likely cause of this would be the form being publishd to SharePoint server using a URL in the format http://servername/sitename.domain.com, and a user trying to access the form via the url http://servername/sitename/libraryname/... etc

To resolve this issue, a mapping needs to be made to resolve http://servername/sitename/libraryname/ to point to http://servername/sitename.domain.com

To do this, go to SharePoint Central Administration, click on System Settings, click on 'Configure alternate access mappings' under Farm Management and ten click on 'Add Internal URLs' to add the mappings. It is mostly self-explanatory from this point

1 comment:

  1. I'm connecting an InfoPath 2010 form to a SQL 2008 table. I was instructed to enable the cross-domain access under InfoPath Forms Services in SharePoint Central Administration. My question is if this will create a security issue by allowing users to publish information outside of my SharePoint 2010 site?

    ReplyDelete