none
An error occurred while trying to connect to a Web service + Infopath 2010 + SharePoint 2010 RRS feed

  • Question

  • We have designed an InfoPath form which is browser enabled and we are trying to call OOB web service named –GETUSERPROFILEBYNAME so as soon as the forms loads then it has to show the name of logged-in user but it’s failing every time and giving the following error message:

    An error occurred while trying to connect to a Web service.

    An entry has been added to the Windows event log of the server.

    Log ID: 5566

    Correlation ID: 00421dc6-3182-4d05-bcb0-24c50383598d

    We have checked the logs based on this correlation id and got the following message: Data adapter failed during OnLoad: Unable to connect to the remote server

    Topology:This is a development environment which has only one server i.e. WFE

    Also- we have already added the site inside the host file.

    We need your inputs by which we can resolve this issue as soon as possible, Thank you.

    Thursday, September 19, 2013 10:35 AM

All replies

  • Further info on this-
    -We already have DisableLoopbackCheck set to 1

    -We are not using internal data connections or a data connection file (.udcx)

    -Trust level is already set to domain

    - We are not using claim authentication
    Thursday, September 19, 2013 2:18 PM
  • Hello,

    Do you get same error when you preview the form? If you are on single server and accessing profile within a farm then you should be able to access it. I am also assuming that you have configured the Infopath Form  service in central admin if not just verify-->go to CA-->general app settings-->configure infopath form service-->" User Browser-enabled Form Templates" section checkboxes are checked.

    You should also make sure that you are using current site userprfoileservice.asmx. for example: If your site path is not on root then try like this: http://server/sites/testsite/userprofileservice.asmx.

    Finally, make sure your UPS is working properly and you are able view the result. just to verify that, check user in UPS in CA.


    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, September 20, 2013 9:10 AM
    Moderator
  • here are the details to your questions:

    Do you get same error when you preview the form? - YES

    Browser enabled settings are already configured in Central Administration.

    yes i am using the current site URL only along with appended userprofileservice.asmx

    UPS is working properly as i am checking for myself right now and i can see myself over there.

    Friday, September 20, 2013 9:18 AM
  • another additional info on this-

    It works perfectly without browser enabled i.e. in client mode.

    Friday, September 20, 2013 9:19 AM
  • Is anonymous access enabled?

    Also try to add certificate in your form and make it full trust domain.

    If still face same issue then Could you try the same form in different web application?

    Actually i don't see any problem with standlone server if everything is configured properly.


    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, September 23, 2013 5:50 AM
    Moderator
  • No, anonymous access is disabled across all web applications

    Tried in different web application also but faced the same error.

    Regarding cert and full trust then i need to upload the form in CA which i think it has to work without that also but still i tried and results are -ve.

    Monday, September 23, 2013 11:33 AM
  • Is your SharePoint 2010 web application using the Claims model for authentication instead of Classic? If so, the issue is that the query is using a NTLM. I have a blog post that discusses this for SharePoint 2013.  These steps also apply in a SharePoint 2010 Claims based web application.

    http://www.cdhtalkstech.com/2013/05/31/using-infopath-2013-to-query-data-from-the-user-profile-service-in-sharepoint-2013/


    Julie Boudro | SharePoint Consultant with C/D/H | http://www.cdhtalkstech.com


    • Edited by Julie Boudro Monday, September 23, 2013 12:06 PM
    Monday, September 23, 2013 12:06 PM
  • We are not using claim-based authentication for any of the web applications.

    Our all web applications has been configured with NTLM\Windows auth.

    Monday, September 23, 2013 12:08 PM
  • We are seeing the same problem, but the form is previewing in Infopath just fine.  I have checked everything else in the thread and that is the only difference between my situation and the one described.

    Thursday, December 12, 2013 9:00 PM
  • This may or maynot apply here:

    Check your web.config file under <System.net>   If you have configured a proxy, please remove that entry so that it reads.

    <system.net>
        <defaultProxy />
    </system.net>

    - Do an IIS reset and test your forms.   If the forms work after that, then you can conclude the issue is related to having a proxy configured in your application and its settings.

    Cheers

      

    Monday, March 17, 2014 5:35 PM
  • Did you find a solution for this? I am also facing the same issue. My form opens just fine in infopath preview but i get error in browser.
    Thursday, September 4, 2014 4:28 PM
  • I had to implement two changes for it to work (This started after adding a new WFE server): 

    Step 1 - Disabled loopback on the new WFE server as id already done it on the first one & completely forgot :-) 

    1. Regedit on the server (take a backup) 
    2. Locate the following registry subkey LSA:- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    3. In the right hand side, Right click and New, and then click DWORD Value.
    4. Type DisableLoopbackCheck, and then press ENTER. (Case sensitive) 
    5. Right-click DisableLoopbackCheck, and then click Modify.
    6. In the Value data box, type 1 and ok the change
    7. Exit Registry Editor.
    8. Restart the computer.

    REFERENCE - http://www.infopathdev.com/forums/p/7676/50483.aspx 

    Step 2 - Added host file entry to point back at serer

    1. C:\Windows\System32\drivers\etc
    2. enter 2x host entries  = serveripaddress domain serveripaddress http://sitename 

    This worked a treat for me so thanks to everyone who posted 

    Awad

    • Proposed as answer by AzzaUK Wednesday, April 27, 2016 11:21 AM
    • Unproposed as answer by AzzaUK Wednesday, May 25, 2016 9:09 AM
    • Proposed as answer by AzzaUK Thursday, May 26, 2016 3:14 PM
    Thursday, January 28, 2016 11:35 AM