How to make authenticated request to wcf service hosted in sharepoint 2010?
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(bi开发者_如何学编程nding, new EndpointAddress(url));
Thank you for replies and help.
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
精彩评论