hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Kulkarni" <ashish.kulkarn...@gmail.com>
Subject HttpClient and NTLM authentication issue
Date Wed, 21 May 2008 14:00:07 GMT
I am trying to do NTML authentication to web site using httpclient, and i am
getting the error below
The code i have is as below
HttpClient client = new HttpClient();
client.getState().setCredentials( new AuthScope("uskzoas163", 80,
AuthScope.ANY_HOST), new NTCredentials("userid", "password", "uskzoas163",
GetMethod method = new GetMethod("
method.setDoAuthentication( true );
int statusCode = client.executeMethod(method);

Where is server name uskzoas163, if i open this link from browser i
get a user id, password window, when i enter the userid, password i
get the PDF file
But i am getting this error

org.apache.commons.httpclient.HttpMethodDirector - Authorization required
2934 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor
- Using authentication scheme: ntlm
2934 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor
- Authorization challenge processed
2934 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector -
Authentication scope: NTLM <any realm>@uskzoas163:80
2934 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector -
Credentials required
2934 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector -
Credentials provider not available
2934 [main] INFO org.apache.commons.httpclient.HttpMethodDirector - Failure
authenticating with NTLM <any realm>@uskzoas163:80

What may be the issue


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message