InfoPath calls WebService 401 Unauthorized - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

InfoPath calls WebService 401 Unauthorized

Last post 07-17-2012 11:47 AM by Gennady Vanin (Геннадий Ванин, Новосибирск). 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-27-2012 06:40 AM

    • BMARU
    • Not Ranked
    • Joined on 03-25-2011
    • Posts 24

    InfoPath calls WebService 401 Unauthorized

    Hi,I am trying access UserProfileService Web service on InfoPath 2010 Web browser Administrator Approved Forms (Domain/Full) to populate the User Details on form Load .I am using claim based Kerberos authentication website.I have configured the SPN for website and SQL server to use Kerberos authentication.This forms works in Preview Mode using claim based Kerberos authentication website and in browser & Preview Mode with using claim based NTLM authentication.My web site has anonymous and impersonation authentication is disabled in IIS.I have disabled the sable the authentication loopback check by DisableLoopbackCheck=1 in registry I go the following error on browser......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:381b95c1-df14-42e7-9285-bf75830d2b3f In Log file I got the below error...

    The following query failed: UserProfile (User: 0#.w|domain\username, Form Name: IP: , Connection Target: , Request: http://sitename/_layouts/FormServer.aspx?XsnLocation=http://sitename/sites/IT/FormServerTemplates/UserProfileServiceTest4000.xsn&SaveLocation=http:// sitename /sites/IT/SupportServices/UserProfileTest&ClientInstalled=false&Source=http://sitename/sites/IT/SupportServices/UserProfileTest/Forms/AllItems.aspx&DefaultItemOpen=1, Form ID: urn:schemas-microsoft-com:office:infopath:UserProfileServiceTest4000:-myXSD-2012-04-11T11-40-37 Type:

    DataAdapterException, Exception Message:

    The remote server returned an error: (401) Unauthorized. The remote server returned an error: (401) Unauthorized.)

    I have followed the work around suggested and tried to test it by providing explicit data connection

    File and putting  

    <udc:Authentication>
           <udc:UseExplicit CredentialType="NTLM">
                  <udc:UserId>DOMAIN\test.user1</udc:UserId>
                  <udc:Password>12313d2</udc:Password>
           </udc:UseExplicit>
    </udc:Authentication>

     

    Or  on form load b y changing the Account name by

    http://stevessharepointnuggets.blogspot.co.uk/2012/03/infopath-2010-using-user-profile.html?m=1

     

    concat (“domain\”,username()) or substring-after (username(),”|”) and call web service to get the data.

     

    I think I have tried all the options available to solve the 5566 error but could not get any success.

    Please help me

     

    Thanks in advance

     

  • 07-17-2012 11:47 AM In reply to

    Re: InfoPath calls WebService 401 Unauthorized

    BMARU:
    This forms works in Preview Mode using claim based Kerberos authentication website
     

    How have you decided it?
    I believe Infopath preview (or Filler/client forms) is using NTLM

    BMARU:
    I am trying access UserProfileService Web service on InfoPath 2010 Web browser Administrator Approved Forms (Domain/Full)

    MSDN article

     describing the usage of  userprofileservice.asmx tells:

     

    Important Important:

    The SharePoint application and code described in this article will not work if SharePoint is configured for forms-based authentication. To work correctly, the web application that hosts this SharePoint application must be configured to use classic-mode authentication. For more information about configuring SharePoint authentication, see Plan authentication methods (SharePoint Server 2010).


     BTW, I believe that it is Filler/client forms require administration approval but not Web browser forms

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.