Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 36371 invoked from network); 16 Dec 2004 12:30:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Dec 2004 12:30:43 -0000 Received: (qmail 5444 invoked by uid 500); 16 Dec 2004 12:30:43 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 5372 invoked by uid 500); 16 Dec 2004 12:30:42 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 5352 invoked by uid 99); 16 Dec 2004 12:30:42 -0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_20_30,HTML_MESSAGE,URIBL_SBL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.29.150) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 16 Dec 2004 04:28:44 -0800 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.12.10/8.12.10) with ESMTP id iBGCSEug110626 for ; Thu, 16 Dec 2004 12:28:14 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id iBGCSsPk040920 for ; Thu, 16 Dec 2004 13:28:54 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id iBGCSDK9026645 for ; Thu, 16 Dec 2004 13:28:13 +0100 Received: from d12ml067.megacenter.de.ibm.com (d12ml067.megacenter.de.ibm.com [9.149.164.162]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id iBGCSDIn026641 for ; Thu, 16 Dec 2004 13:28:13 +0100 In-Reply-To: <39806307A8FCD611950A00508B5D51D806696AC7@refrwcmpex02.server.rbsgrp.net> To: "HttpClient User Discussion" MIME-Version: 1.0 Subject: Re: NTLM authentication problem X-Mailer: Lotus Notes Release 6.0 September 26, 2002 From: Roland Weber X-MIMETrack: S/MIME Sign by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 16.12.2004 13:28:40, Serialize by Notes Client on Roland Weber/Germany/IBM(Release 6.0|September 26, 2002) at 16.12.2004 13:28:40, Serialize complete at 16.12.2004 13:28:40, S/MIME Sign failed at 16.12.2004 13:28:40: The cryptographic key was not found, Serialize by Router on D12ML067/12/M/IBM(Release 6.51HF338 | June 21, 2004) at 16/12/2004 13:28:29, Serialize complete at 16/12/2004 13:28:29 Message-ID: Date: Thu, 16 Dec 2004 13:28:28 +0100 Content-Type: multipart/alternative; boundary="=_alternative 00448B1CC1256F6C_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --=_alternative 00448B1CC1256F6C_= Content-Type: text/plain; charset="US-ASCII" Hello Jitesh, it looks like the authentication scope does not match: log: code: "http://servername/index.html" Try to set the credentials as default credentials, using null as the scope. hope that helps, Roland "Gangwani, Jitesh (Churchill India)" 16.12.2004 13:05 Please respond to "HttpClient User Discussion" To "'httpclient-user@jakarta.apache.org'" cc Subject NTLM authentication problem Hi, 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 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: ntlm authentication scheme selected 15-Dec-2004 16:01:46 org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: No credentials available for NTLM @www.maintenance.cws.pse1.rbsgrp.net:80 **************************************************************************** ********************* 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 = newNTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","MY_DOMAIN"); HttpClient client = new HttpClient(); HttpMethod method = new GetMethod("http://servername/index.html"); AuthScope authscope = new AuthScope("http://servername/index.html",80); client.getState().setCredentials(authscope,creds); int statusCode = client.executeMethod(method); System.out.println("Status Code 1: " + statusCode); String responseBody = method.getResponseBodyAsString(); System.out.println("******" + responseBody); method.releaseConnection(); **************************************************************************** *********************** Can anyone please tell me what I am doing wrong. Thanks Jitesh 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 appropriate. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org --=_alternative 00448B1CC1256F6C_=--