I'm hosting an ASP.NET web application on a Sharepoint 2007 box, which makes a web service call to Sharepoint to retrieve a document location (specifically, the GetListItems method).
The service is consumed with passed credentials of a valid Sharepoint account with appropriate permissions.
ListServiceWrapper listService = new ListServiceWrapper();
/*Pass credentials to service call object*/
listService.Credentials = new NetworkCredential(spUserName, spPassword, spDomain);
/*Set the Url property of the service for the path to a subsite.*/
listService.Url = ConfigurationManager.AppSettings.Get("rootSite") + "/_vti_bin/lists.asmx";
When the web app is run locally on my development box (I'm a Sharepoint user on the same domain), the service call works great. When deployed to the Sharepoint box, the application returns:
The request failed with HTTP status 401: Unauthorized.
We've tried to change the App Pool user of the web app on the Sharepoint box to an authorized Sharepoint user, but still haven't had any luck. I figure if we changed the Sharepoint authentication to Kerberos instead of NTLM, it would solve the issue. Unfortunately that isn't an option here. This possibly has something to do with the NLTM double-hop issue?