hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Augusto de Oliveira Aragão <andre.augu...@ca.tco.net.br>
Subject NTLM Authentication Error
Date Fri, 04 Apr 2003 16:12:46 GMT
HI!

I'm trying to access a ntlm authenticated server, but it´s not working. The
logs are returning the following: 
[HttpMethod] Already tried to authenticate to "tconet#null" but still
receiving 401.

Here´s my code:

HttpClient client = new HttpClient();
client.setConnectionTimeout(60000);
client.getState().setCredentials(
       "tconet",
        new
NTCredentials("Andre.Augusto","senha","ca_andreaugusto","CACEL01")
);
String url = "http://tconet/index.asp";
GetMethod method = new GetMethod(url);
method.setFollowRedirects(true);
method.setStrictMode(false);
method.setDoAuthentication(true);
logger.info("Trying to reach " + url);
String responseBody = null;
long tempoinicial = System.currentTimeMillis();
long tempogasto = 0;
try {
  int retorno = client.executeMethod(method);
  ...
  ...

Thanks in advance,

Andre Augusto

Mime
View raw message