hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <adr...@intencha.com>
Subject Re: NTLM Authentication Error
Date Thu, 10 Apr 2003 22:20:40 GMT
Hi Andre,
We make heavy use of NTLM authentication and I know of quite a few 
other people who also use it in HttpClient so I'm pretty certain it's 
working correctly.  From the little information you've provided, it 
looks like the username, password, realm or host is not being accepted 
by the server.

There are a number of catches to be aware of when using NTLM and these 
are documented at 
http://jakarta.apache.org/commons/httpclient/authentication.html

If you aren't being hit by any of those problems could you send through 
the output each step listed in the troubleshooting doc at 
http://jakarta.apache.org/commons/httpclient/troubleshooting.html in 
particular a complete log at debug level with wire trace on.

Regards,

Adrian Sutton.

On Wednesday, April 9, 2003, at 08:02  PM, André Augusto de Oliveira 
Aragão wrote:

> HI!
>
> Did anyone ever sucessfully use NTLM authentication??? I really could 
> not
> figure out where is my mistake...
>
> Regards
>
> Andre
>
> -----Original Message-----
> From: André Augusto de Oliveira Aragão
> Sent: sexta-feira, 4 de abril de 2003 13:13
> To: 'commons-httpclient-dev@jakarta.apache.org'
> Subject: NTLM Authentication Error
>
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
>


Mime
View raw message