1

This must be something very simple I just don't get.

I create the demo wcf service by Microsoft: http://msdn.microsoft.com/en-us/library/ff521581.aspx

I create two web applications on my SP2010 development farm, one with Claims, one with Classic. I add a site collection to both.

Next I deploy the simple demo service to both. And try to call it from visual studio console application.

I add the following line to on the client (in order to use Ntlm authentication)

using (MyClient client = new MyClient()) { client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; }

This works for the classic web application but gives the following error on the claims web application: "The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'."

1 Answer 1

1

If your web application is configured for Claims mode authentication, then you cannot pass NTLM credentials/tokens. You must get a FedAuth token from the identity provider and pass it to the service.

I suggest that you read Vittorio's book on Windows Identity Framework programming.http://www.amazon.com/Programming-Windows-Identity-Foundation-Dev/dp/0735627185

5
  • Actually funny thing it just started to work.
    – why oh why
    Jan 4, 2012 at 16:48
  • ...after switching to SP oob web.config instead of a custom one.
    – why oh why
    Jan 4, 2012 at 16:54
  • ..i mean the service seems to work with windows cretentials: i can recognize the user in the service, and personalize based on the current user. but do you mean there's something wrong in this approach?
    – why oh why
    Jan 4, 2012 at 16:59
  • Can you explain the statement "If your web application is configured for Claims mode authentication, then you cannot pass NTLM credentials/tokens. You must get a FedAuth token from the identity provider and pass it to the service." with a example. Feb 21, 2012 at 4:56
  • I will not. Read up on Microsoft's support of claims identity and you will find a wealth of information. Mar 5, 2012 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.