Sunday 14 July 2013

GetUserProfileByName Connection Error in SharePoint InfoPath Forms (Error 5566)


Scenario:

My web application uses claims based authentication with windows authentication (NTML). No other authentication provider is used. Whenever I try to connect to the web service from the InfoPath form I get the following error:
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:fa658c2f-a405-433a-8895-27fb43fd5706

 

Solution

After some further investigation i found that it's actually the "ASP.NET Impersonation" that needs to be disabled under "Authentication Providers" for the web application in IIS.
I've tried this on several web applications and it's very consistent.
The web applications have been running without problems in my environment for several days so I think it's safe to disable it.

15 comments:

  1. This worked like a charm. Thanx buddy. But the actual question is: how did you find this solution?

    ReplyDelete
  2. Good to know that this worked for you :)
    I was able to locate the source of the problem from the event viewer then after deep investigation in SharePoint log files i found it...

    ReplyDelete
  3. Muchas Gracias.... Resolví mi inconveniente..

    ReplyDelete
    Replies
    1. Yasmin Buenas tardes me puedes indicar como llegaste a la solución del problema

      Delete
  4. My case is different...I configured an AAM for external access and the form keeps showing the error. Pls any way out.Thanks

    ReplyDelete
  5. verry good. So, if you disable the ASP.NET impersonation then the infopath form which you have created does't work as it should be. I hope you are getting what I am trying to say?

    For instance, you are using a web service to fetch who the current user is from AD using "getbyprofilename". If you disable the ASP.NET impersonation authentication then it would not get the desired records.

    ReplyDelete
  6. In my case I was trying to get the logged user on my infopath form, and the error was fixed, however as mentioned on the above comment I didn't get the desired results, on the field I was supposed to get the current user I received the application pool user instead. I will find out another solution

    ReplyDelete
  7. The same problem, it tooks the credentials that we putted for the target application we created

    ReplyDelete
  8. add you service account to the infopath connection UDCX file and approve the udcx file:




    it worked for me without changing asp.net impersonation.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. not able to paste correctly here: its UDC authentication, having appId and credential type.

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete