Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

For some time I've been highly annoyed with the data connection errors I receive when trying to preview my InfoPath forms.

I had to publish the form before I could see my lookup list working correctly via the data connection. It always seemed that while I could create the data connection and reference a target SharePoint list I could never actually preview it. Annoying!

So why is this? I'll self answer this; there are many blog posts on the solution but none tied directly into my set of symptoms.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The root of the problem is that my computer is not on the same domain as the SharePoint server. This means that my InfoPath form will not establish a full trust with the server and therefore be unable to retrieve the data it needs. Once the form is published onto the site it resides on the same domain and this problem is eliminated. But man is it annoying when I am trying to test a form.

The solution is pretty simple...

  • First create a Data Connection Library somewhere universally accessible to form users on your site.
  • Goto Site Actions>More Options and then find the Data Connection Library.
  • Name the data connection library what you like; you will be using it to house the file we will end up generating for our cross-domain data connection.
  • Now go into MS InfoPath and make your data connection. If you don't know how to make a data connection then chances are you probably won't be reading this post...
  • Once the data connection has been made to your target list or library go back into the Data Connection menu.
  • Highlight your target data connection and then click "Convert to connection file".
  • You will then be prompted to save this new connection file.
  • Go ahead and save it into the Data Connection Library you created in the first step of this post.

If your other lists are on the same site you shouldn't need to convert their data connections; this converted connection should do the trick. I am not sure about using a different site/sub-site on the same site collection. If for some reason a different site still won't load, then just repeat these instructions!

I hope this proves to be helpful. This same method can be used for forms that are commonly distributed via email and not published to a single location on the domain.

share|improve this answer
add comment

Whenever I need to preview an Infopath form template with data connections I attribute it Full Trust and digitally sign. Then, I do not have any problems to preview it.

It is for having data connections to Office 365 (Sharepoint Online) lists, web services, etc. Is it different for in-premises Sharepoint Server sites?

One time I had very serious problems (up to jumping to wrong conclusions) because I locally stored infopath XSN templates in a directory having "#" symbol which produce very weird problems. There might be some other characters which invoke the problems when used in file paths/directory names for Infopath local storage...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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