NTLM authentication problem

J

Jitesh Gangwani

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 <any
realm>@www.maintenance.cws.pse1.rbsgrp.net:80



Following is the java code
NTCredentials creds = new
NTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","CWSPSEHOLI");
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top