1

I am very new to SharePoint and Development in ASP.net. And I am stuck on probably something very small. I created a VPC with WSS 3.0, SharePoint 2007, Windows Server 2008. (I followed TechNet's instructions)

The Issue:

I am creating a web service to pull information from a SharePoint list. I am using the WSS 3.0SDK's code for ReturnListItems and when I run the code I am getting this error.

System.Net.WebException: The request failed with HTTP status 401: Unauthorized.

I am not 100% sure where to go from here. I can only assume that the problem is an authentication issue.

2

First, did you set the webservice credentials to defaultcredentials or are you setting them manually.

ws.Credentials = CredentialCache.DefaultCredentials;

or

ws.Credentials = new NetworkCredential(userid, password, domain);

Second, if you are running everything on the same box, did you configure your backconnectionhostnames correctly?

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

6
  • I did the following "ws.UseDefaultCredentrials = true;" and I already disabled the LoopBack. Any other ideas? Thank you
    – Brogers
    Apr 30 '12 at 18:24
  • So everything is on the same box? If so you wouldn't have the NTLM double hop issue. Maybe try setting credentials to see if that changes anything. Apr 30 '12 at 19:11
  • Yes its on the same box.
    – Brogers
    Apr 30 '12 at 19:47
  • What happened when you set the credentials instead of using the default? May 1 '12 at 12:12
  • Maybe run fiddler and examine the results to see what is happening. Do you have anonymous turned on for the web application? May 1 '12 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.