2
votes

I want to have a WCF service using basic authentication. It will be an application in the sharepoint site. The sharepoint site is using ntlm/claims authentication. When I run the service to read from a sharepoint list, I get 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))'. What configuration changes do I need to make to get a WCF service that uses basic authentication to be able to read from these sharepoint lists?

1

1 Answers

0
votes

The code behind your webservice needs to authenticate with SharePoint in order to access the list (Assuming you're using the Server Object Model). Since you're using Basic authentication with the webservice you won't be able to authenticate.

One possibility is to set your webservice to run with a particular user account and give that account permissions to your SharePoint list. You can then execute your SharePoint-accessing code using SPSecurity.RunWithElevatedPrivileges so that it connects to SharePoint with the credentials of the underlying application.