hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: NTLM authentication problem
Date Thu, 16 Dec 2004 12:28:28 GMT
Hello Jitesh,

it looks like the authentication scope does not match:

log: <http://www.maintenance.cws.pse1.rbsgrp.net:80>
code: "http://servername/index.html"

Try to set the credentials as default credentials, using
null as the scope.

hope that helps,

"Gangwani, Jitesh (Churchill India)" <Jitesh.Gangwani@rbs.co.uk> 
16.12.2004 13:05
Please respond to
"HttpClient User Discussion"


NTLM authentication problem

   I am trying to a get a webpage which is on IIS server in different
domain secured by NTLM authentication. I am using
commons-httpclient-3.0-beta1 api to connect. I am not able to get
index.html page.

The NLTM api is giving following information messages 

15-Dec-2004 16:01:46
INFO: ntlm authentication scheme selected
15-Dec-2004 16:01:46 org.apache.commons.httpclient.HttpMethodDirector
INFO: No credentials available for NTLM <any

The web page which is retrieved is of HTTP Error
HTTP 401.2 - Unauthorized: Logon failed due to server configuration
Internet Information Services

Following is the java code

 NTCredentials creds =
 HttpClient client = new HttpClient();
 HttpMethod method = new GetMethod("http://servername/index.html");
 AuthScope authscope =  new AuthScope("http://servername/index.html",80);
 int statusCode = client.executeMethod(method);
 System.out.println("Status Code 1:  " + statusCode);
 String responseBody = method.getResponseBodyAsString();
 System.out.println("******" + responseBody);

Can anyone please tell me what I am doing wrong.



The Royal Bank of Scotland plc, Registered in Scotland No. 90312. 
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the 
Financial Services Authority and represents The Royal Bank of Scotland 
Marketing Group. The Bank sells life policies, collective investment 
schemes and pension products and advises only on the Marketing Group's 
range of these products and on a With-Profit Bond produced by Norwich 
Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If 
the message is received by anyone other than the addressee, please return 
the message to the sender by replying to it and then delete the message 
from your computer. Internet e-mails are not necessarily secure. The Royal 
Bank of Scotland plc does not accept responsibility for changes made to 
this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of 
viruses, it is the responsibility of the recipient to ensure that the 
onward transmission, opening or use of this message and any attachments 
will not adversely affect its systems or data. No responsibility is 
accepted by The Royal Bank of Scotland plc in this regard and the 
recipient should carry out such virus and other checks as it considers 

To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

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