I am trying to add a reference to the SharePoint list service at https://abcd/_vti_bin/lists.asmx
, but I get the following error:
There was an error downloading 'https://abcd/_vti_bin/lists.asmx/_vti_bin/ListData.svc/$metadata'. The request failed with HTTP status 404: Not Found. Metadata contains a reference that cannot be resolved: 'https://abcd/_vti_bin/lists.asmx'. The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'. The remote server returned an error: (401) Unauthorized. If the service is defined in the current solution, try building the solution and adding the service reference again.
The SharePoint site has Windows Authentication enabled, ASP.NET impersonation enabled, and Anonymous access disabled.
I was able to connect to the service using IE; it prompts for the NT user ID and password. The error shows up when I try to add a reference from a Windows Application.
Any help would be much appreciated.
Environment: Visual Studio 2012, Sharepoint hosted on IIS 7.5, Windows Server 2008 R2