<binding name=“ServiceBindingBasic“ sendTimeout=“00:1:00“ maxReceivedMessageSize=“10000000“>
<readerQuotas maxArrayLength=“10000000“ maxStringContentLength=“10000000“/>
<security mode=“TransportCredentialOnly“>
<transport clientCredentialType=“Windows“ />
</security>
</binding>
Then, after a few months, I started seeing this message on my [somewhat new] XP machine:
The HTTP request is unauthorized with client authentication scheme ‘Ntlm’. The authentication header received from the server was ‘Negotiate,NTLM’.
Yet, when these services were installed on Windows Server 2003 sp1, no issues. At the end of the day, the credentials were’nt flowing correctly from one machine to another, and when I finally found a small article that had one tidbit that worked, I got past this thing. I needed to set this on my dynamic proxy:
client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
So, if you ever see this error message, or a derivative of it, don’t go chasing down things like this crap until you’ve ensure your TokenImpersonationLevel meets whatever your requirements are.
I must admit, WCF security is a huge topic, and I certainly don’t lay claim to expertise in this area, so also consult others!
J