views:

23

answers:

0

Hello. 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.