NTLM authentication token invalid only from Apache HttpClient

0

I'm trying to use NTLM authentication in HttpClient 4.3.3 as follows:

BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider();
AuthScope authScope = new AuthScope(uri.getHost(), uri.getPort(), AuthScope.ANY_REALM, "ntlm");
credentialsProvider.setCredentials(authScope, new NTCredentials(username + ":" + password));
context.setCredentialsProvider(credentialsProvider);

I see it negotiating NTLM state up to MSG_TYPE3_GENERATED before the server fails with 404.1 and logs The token supplied to the function is invalid (0x80090308).

It's a local account and not a domain account so SPN is not an issue. I've tried all combinations of domain and workstation names. Only Windows Authentication is enabled and only the NTLM provider is selected within it for this folder.

It works in the Android stock browser when I just enter the username and password in the prompt.

android
iis
apache-httpclient-4.x
ntlm
apache-commons-httpclient
asked on Stack Overflow Mar 31, 2014 by Monstieur

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0