2
votes

I have a win-service what make calls to wcf-service, hosted inside sharepoint 2010. In wcf-service i access a SPList on the sp-site. But I can't access a list becouse of win-service uses anonymous call to wcf-service.

How can i implement authenticated request to sharepoint wcf-service.

My win-service runs under identities of the domain user what have access to sharepoint site. And I create client for wcf using next piece of code

string url = "...";
var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
MySericeClient client = new MyServiceClient(binding, new EndpointAddress(url));

Thank you for replies and help.

1

1 Answers

1
votes

I had a similar issue the last days and this was the solution:

http://ddkonline.blogspot.com/2009/11/fix-http-request-is-unauthorized-with.html

Maybe it helps