Unable to add link to SharePoint list service

I am trying to add a link to a SharePoint list service in https://abcd/_vti_bin/lists.asmx , but I get the following error:

An error occurred while loading ' https: //abcd/_vti_bin/lists.asmx/_vti_bin/ListData.svc/ $ metadata'. Request error with HTTP status 404: not found. Metadata contains a link that cannot be resolved: ' https: //abcd/_vti_bin/lists.asmx '. The HTTP request was not authorized using the Anonymous client authentication scheme. The authentication header received from the server was Negotiation, NTLM. The remote server responded with an error: (401) Unauthorized. If the service is defined in the current solution, try creating a solution and adding the service link again.

The SharePoint site has Windows authentication enabled, ASP.NET impersonation mode enabled, and anonymous access disabled.

I managed to connect to the service using IE; it asks for the NT user ID and password. The error appears when I try to add a link from a Windows application.

Any help would be greatly appreciated.

Environment: Visual Studio 2012, Sharepoint, hosted in IIS 7.5, Windows Server 2008 R2

+7
source share
1 answer

To create a link to a service for accessing SharePoint lists

  • Open or create a Visual Studio project.
  • In Solution Explorer, right-click the node link, and then click Add Service Link.
  • In the Address field, enter the URL of the destination site and add /_vti_bin/ListData.svc. For example, the address for intranet.wingtip.com would be http://intranet.wingtip.com/_vti_bin/ListData.svc .
  • Change the default name in the Namespace field from ServiceReference1 to something more suitable, for example WingtipSite.
  • Click OK to create proxy classes, including the data context and entity classes for the lists you want to access.
  • Start writing code with these proxy classes that provide strongly typed access to the columns of SharePoint list items.
-one
source

All Articles