Authentication failed while accessing Sharepoint list via web service

A few months ago, I wrote a Windows service that will ping a Sharepoint list using the _vti_bin / lists.asmx GetListItemChanges function. It worked fine until a few weeks ago when my company upgraded our Sharepoint instance to SP1.
Now, when my service tries to access Sharepoint, I get 401.1 authentication error:

Mistake:

You do not have permission to view this page. You do not have permission to browse this directory or page using the credentials you provided.
Please try the following: go online if you think you should be able to browse this directory or pages.
HTTP Error 401.1 - Unauthorized Access: Access is denied due to invalid credentials.
Internet Information Services (IIS)

I checked and my privileges on the site have not changed. here is the code I'm calling the list into:

Lists listsService = new Lists(); listsService.Credentials = new NetworkCredential("UserName", "Password", "domain"); Result = listsService.GetListItemChanges("List name", null, dTime.ToString(), null); 

I was also informed that basic authentication might be disabled on our farm. I do not believe that I am using this, but I can be wrong.

+6
authentication web-services sharepoint
source share
4 answers

Based on the information provided, I doubt that this is a programming error. Can you access the IIS Manager interface on the server hosting the SharePoint site? If yes, check valid authentication technologies. Are anonymous connections allowed? Is Windows Integrated Authentication Enabled? HTTP Basic auth? Ask your SharePoint infrastructure / users about the possibility of double transition (proxy). If so, this might work, but it is a pain to configure (Kerberos delegation). The NetworkCredentials class supports all standard authentication schemes supported by IIS (except for forms):

http://msdn.microsoft.com/en-us/library/system.net.networkcredential(VS.80).aspx

You may need infrastructure people to install the SPN for the SharePoint web interface:

http://support.microsoft.com/kb/929650

However, I recommend that you do not change anything using IIS Manager. Ask the SharePoint administrator to make changes to the authentication technologies allowed for the site using SharePoint Central Administration.

Regards Sam

+1
source share

I just found a very similar problem and solved it thanks to MS KB article: http://support.microsoft.com/kb/896861

The bit you should try is this:

Method 2: Disable loopback verification Follow these steps:

  • Click "Start", select "Run," enter "regedit" and click "OK."
  • In the registry editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA
  • Right-click Lsa, select New, and then DWORD Value.
  • Type DisableLoopbackCheck and press Enter.
  • Right-click DisableLoopbackCheck, and then click Modify.
  • In the Value field, enter 1 and click OK.
  • Close the registry editor and restart the computer.

This solved the same problem in an environment in which I had all the normal solutions (added credentials to call the web service).

+1
source share

Do you have proxies on your internal network?

I think along the double-jump lines, and that Basic Auth is not inclined to this, but it is NTLM. If you have a proxy server, then there is a double hop problem. If you directly access the machine and can only count one jump (a service to a web service), this should not be a problem.

0
source share

Assuming these are not authentication issues using SSL or Basic / Windows, then I bet on that

To test the log on a local server and try browsing your site. If you cannot browse successfully using the above username / pwd, but you can from a remote computer, then this article is for you.

When you browse a website that uses integrated authentication and when hosted in IIS 5.1 or IIS 6, you receive error 401.1

http://support.microsoft.com/default.aspx?scid=kb;en-us;896861

0
source share

All Articles