Friday, October 16, 2009

SharePoint web services access give The Request Failed with HTTP Status 401: Unauthorized

Scenario: Consume the SharePoint out of box webservice (People.asmx) to mimic PeoplePicker functionality in ASP.NET website
ASP.NET Environment: Windows Server 2008 with IIS 7.0
MOSS Environment: Windows 2003 SP2 with IIS 6.0
Details: Both ASP.NET and MOSS environments are part of the same domain. ASP.NET web application runs under a service account in IIS which is part of domain
Issue: Trying to access SharePoint web service from asp.net gives an error "The Request Failed with HTTP Status 401: Unauthorized".
Tried running browser under the context of domain user and accessed the people.asmx url. It works fine and WSDL is visible
Tried Impersonation but it made no difference
Tried giving permissions to the domain user on the site collection - didn't work
Solution: Give permissions to the domain user on the web application.
Central Admin -->Application Management --> Application Security -->Policy for webapplication --> Select the web application --> Add User
Add the domain user to the users list and give him required permissions on the web application. That fixed the issue

8 comments:

  1. What could be the alternate solution when you are just a site collection admin and the Server admins are reluctant to such changes?

    ReplyDelete
  2. .NET Framework (pronounced dot net) is a software framework developed by Microsoft that runs primarily on Microsoft Windows.

    Php Developer India

    ReplyDelete
  3. Integrity of messages that are exchanged between the SharePoint application and the Web service.


    SharePoint Development

    ReplyDelete
  4. how can i fix the issue for sharepoint 2010 thks

    ReplyDelete
  5. Nice blog,If you want more information please visit our link
    SharePoint Training in Hyderabad

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

    ReplyDelete