InfoPath cannot connect to a data source when viewed in browser – Cross Domain Issues – Universal Data Connection

InfoPath cannot run the specified query.

InfoPath cannot connect to the data source.

Access is denied.

One of the big issues with InfoPath Forms is its error reporting. It could sometimes piss you off. It says there is a problem that is it! We have to spend lot of time clicking and clicking and clicking buttons all over trying to find where is the problem. May be that is how these tools should work…

Steps to go with when you get the above error:

  1. The above error seems to be quite often and it hints that there is some problem with the ‘Data Source/Connection’. If the form is showing the error while loading i.e form never loads but shows a message to ‘continue or start over’, then there is some problem with the data source which is set up to ‘Automatically retrieve data when form is opened’.
  2. If the above is the situation then open up the Data Sources window (Tools – Data Connections) and make sure that the data connection is set up properly and the data source is in place, working and serves requests.
  3. If the above error is shown when user does some action like clicking on button, then check the Rules in the properties of that control (button) and check for those data sources/connections.
  4. If the form works fine when previewed as an application but throws the above error after publishing to SharePoint site or when viewed as a browser form, then most probably the problem will be with the cross domain issue. If the InfoPath is trying to query or submitting to a web service (could be any other data source) and that web service is hosted as and the sharepoint site is hosted as then thats called a cross domain issue. The infopath form is trying to talk to a service which is hosted in a different domain and it can’t trust it. This can be solved by giving full trust to the form(Tools – Form Options – Security and Trust) but its not the right way to go and your SharePoint admin might restrict that. The only way to go is setting the security and trust to ‘Domain’ and converting the existing data connections or just the cross domain connections to Universal Data Connection (UDC) format. Its very simple to do and gets rid of any cross domain issues. To create UDC connections read this article. For those who have no patience to read the article, below are the quick steps involved:
    1. If Universal data connection document library doesn’t exist in the SharePoint site then create one or request your admin to create one and give you proper rights for you. (Go to ‘View all site content’ – Create – Universal Data Connection Library)
    2. Open up the InfoPath forms Data Connections window, select the cross domain data source connect and then click the ‘Convert’ button and follow the wizar. You need to provide the above created UDC library along with a name for the file for example:
    3. Now that is not enough, either you or your admin should approve the sampleudc.udcx document created in the UDC library.
    4. Re-publish the InfoPath form to SharePoint and test it.
  5. In central administration, under InfoPath Forms Services configuration, there is a checkbox to allow cross-domain issues. I am not sure if this is done then above UDC is still required or not. I will update as I learn about it.

More links worth to read:


46 thoughts on “InfoPath cannot connect to a data source when viewed in browser – Cross Domain Issues – Universal Data Connection

  1. hi…working with udc files is working fine for me (admin)…I recently added a user to our org and cannot make the ‘final’ connection to run simple queries…strange thing is that his user can jump into design mode and the query runs…just cant get to 1st base from opening the form off the portal…I see the data connection loading window popup- but craps out with

    InfoPath cannot run the specified query.

    InfoPath cannot connect to the data source.

    Access is denied.

    this user can definitely access the tables…and can access the tables via design mode…I’m at a loss

  2. Hi-

    I have created a webservice which populates two drop downs. They work fine when previewing, but have this problem when I publish them. I went through the steps above, but I don’t know what step 4 or 5 are. Can you help me by telling me how to do it?

    I’m getting an error saying the following…….

    An error occurred accessing a data source.

    An entry has been added to the Windows event log of the server.
    Log ID:6932

    An error occurred accessing a data source.

    An entry has been added to the Windows event log of the server.
    Log ID:5566


  3. Lets say your webservice url is
    and the sharepoint site to which you published is

    The form which is under the domain is trying to read/ping the webservice which doesn’t belongs to the same domain, so it is not trusted and so the request fails.

    As said in the above article:
    -set the form to full trust
    -InfoPath Forms Services configuration in central admin: select the Allow cross domain issues.
    Try these steps skipping the 4th item. If this doesn;t work then you have to read more about the UDC library.

  4. If you are getting “access denied error” then just open the your InfoPath form in design mode

    Tools-> Form Options -> Go to “Security and trust”
    uncheck automatically determine security level

    and check the radion button “Full Trust”

    • No. Full Trust mode requires a valid security certificate be installed. You can not just check the “Full Trust” button and expect it to work.

  5. Pingback: Sharepoint, workflow, WSS, Infopath, MOSS 2007, web part, ASP.NET

  6. I am using a hosted Sharepoint site and I am trying to connect to a SQL database stored locally on my computer. The weird part is I had this working a couple days ago and now when I try to publish a new form to the sharepoint site my drop downs are no longer able to populate from the database. There are no trust issues and the only thing I have changed is the database. I have even tried re-tracing my steps but nothing seems to work. My infopath form works fine, but when I try to run it in a browser I get the “There has been an error while processing the form.” Log ID 6932. What could really help is locating the additional information about this error, which is not in the event log as described.

  7. Hi ,

    We have recently migrated infopath from 2003 to 2007. Now the infopath files are migrating to the old server instead of the new server. Any advise.

  8. When trying to connect an infopath form (2007) to an SQL server in another domain using the Data Connection Library I was unable to retrieve the data.

    When you create the Data Connection Library it writes the details of the server you need to connect to .. i.e. SQLServername.. we found as they were in different domains the form hosting domain didn’t actually know where the named destination server was as the domains were seperated by a firewall.

    By creating a NAT address on the firewall and then editing the Data Connection Library and replacing the SQLServername with the NAT address fixed the issue – Note, you need to set up NAT addresses for the returning traffic.

  9. Pingback: My Blog: 2010 in review « Share Notes – All about Sharepoint Office System, .Net

  10. One point form my side, if U r using a web service then the error in data source may come if U chose to load the form while the browser enabled infopath form is loading, I mean getting the data while the page is loaded may throw this exception.So while publishing U must unselect the check box.

  11. stop buying GMO foods from the supermarkets… stop taking vaccines and flu shots…. the American and European Government are SICK EVIL WAR CRIMINALS who inject toxic chemicals and poisons into our food supply

  12. Wow, amazing blog format! How long have you ever
    been running a blog for? you made blogging glance easy.
    The total look of your web site is excellent, as neatly as
    the content material!

  13. There’s nothing beyond him– not illness, not inkwells. Online file and photograph sharing sites make it simple to express your images & documents as well. It might have happened for the reason that the paper tray is empty & demands to be refilled.

  14. This i – Phone app is certainly useful if
    you have no idea where to eat next. ) Zorbaz is noted for its
    wide selection of beers, fresh salsas, and homemade pizza dough.
    You may be surprised as many restaurants participate in these beneficial discount offers.
    Local cuisine plays a key role to develop interest in for a particular place.
    The dishes at El Celler de Can Roca astound in both
    presentation ‘ caramelised olives are presented hanging from a bonsai tree ‘ and in their
    seductive flavours.

  15. With every year they grow larger and improve their quality of work.
    When any vacancy arises in the 19 public sector banks that are involved, candidates will be called directly for an interview.
    Simply passing class XII exams does not make you eligible for IBPS
    Clerk Exam 2013. In today’s world it is very important to have a strong relation and a healthy environment for both the employer and the employee. It is a common written exam for the clerical and bank po posts.

  16. Hey! Someone in my Facebook group shared this website with us so I came to give it
    a look. I’m definitely loving the information. I’m bookmarking and
    will be tweeting this to my followers! Fantastic blog and excellent design and style.

  17. Great goods from you, man. I’ve understand your stuff previous to and you’re just extremely magnificent.
    I really like what you’ve acquired here, certainly like what you’re saying and the way in which you
    say it. You make it enjoyable and you still care for to keep
    it sensible. I can’t wait to read much more from you. This is really a great site.

  18. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.

    You definitely know what youre talking about, why waste your
    intelligence on just posting videos to your site when you could be giving
    us something enlightening to read?

  19. Thank you a lot for sharing this with all people you actually recognize what you’re speaking approximately! Bookmarked. Kindly also discuss with my website =). We will have a link change contract between us

  20. When it is web design, simplicity is always the best. Flyers can be printed on glossy paper to achieve a higher quality compared to other types of
    paper. However I will only mention a few of the most popular website types of which the majority of
    the users tend to buy.

  21. I’m really enjoying the theme/design of your website. Do you ever run into any browser compatibility issues? A number of my blog audience have complained about my website not operating correctly in Explorer but looks great in Chrome. Do you have any advice to help fix this issue?

  22. Hi there would you mind stating which blog platform you’re using? I’m looking to start my own
    blog soon but I’m having a difficult time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for
    something completely unique. P.S Sorry for getting off-topic but I
    had to ask!

  23. It’s really a great and useful piece of information. I am happy that you shared this helpful info with us. Please stay us informed like this. Thank you for sharing.

  24. I acknowledge that some couples cannot have children or don’t possess the
    indicates to adopt kids, and older people may require the companionship that pets provide; in these situations pets may be a satisfactory substitute.
    How we assist our pets attain all three will probably be our
    toughest acts of love. But in India pets are not permitted
    to be brought to schools. special kids in your life then purchasing gifts
    for children will probably be a. Your bored backyard
    dog will advantage greatly if you offer it with a wealthy way of life while you are away at function.

  25. Pingback: "download pdf"

  26. I was wondering if you ever considered changing the
    layout of your blog? Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or
    2 images. Maybe you could space it out better?

  27. It’s a shame you don’t have a doonate button! I’d most certainly donate to this excellent
    blog! I suppose for now i’ll settle for bookmarking and adding your RSS
    feed to my Google account. I look forward to fresh updates and will share this site with my Facebook group.

    Talk soon!

  28. Definitely believe that which you stated. Your favorite justificaton
    seemed to be on the net tthe easiest thing
    to be aware of. I say to you, I certainly get irked while people thinmk about worries that they just don’t know about.
    You managed to hit the nail upon the top and also
    defined out the whole thing without having side effect , people
    could take a signal. Will probably be back to get more.

  29. hey there and thank you for your information – I’ve certainly picked up anything new
    from right here. I did however expertise a few technical points using this web
    site, as I experienced to reload the web site lots of times previous
    to I could get it to load properly. I had been wondering if your hosting is OK?

    Not that I’m complaining, but slow loading instances times will often affect your placement in google
    and could damage your high quality score if ads and marketing with Adwords.
    Well I’m adding this RSS to my email and could look out for a lot more of your respective exciting content.
    Make sure you update this again very soon.

  30. So, you know you need to reduce your carbon footprint.
    Thus, complete purification may not be advisable for
    drinking uses. Passive water heaters uses the natural convection of
    heated water to move through a system.

  31. Hi, I think your site might be having browser compatibility issues.

    When I look at your blog in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, superb blog!

  32. Excellent goods from you, man. I have bear in mind your
    stuff prior to and you’re just too great. I really like what you have acquired right here, really like what
    you’re saying and the best way in which you say
    it. You make it entertaining and you continue to care
    for to keep it sensible. I cant wait to read much more from you.

    This is really a terrific web site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s