Tried to Authenticate using NTLM. Attached is JCTest.java sample code
and debug trace in debug.txt. It comes back finally as "Access Denied".
Does anyone has a clue?

Thanks.
[DEBUG] HttpConnection - -Creating connection for localhost using protocol http:80
[DEBUG] HttpConnection - -HttpConnection.setSoTimeout(0)
[DEBUG] HttpMethod - -Preemptively sending default basic credentials
[DEBUG] HttpMethod - -Default basic credentials applied
[DEBUG] HttpMethod - -Execute loop try 1
[DEBUG] wire - ->> "GET / HTTP/1.1[\r][\n]"
[DEBUG] HttpMethod - -Adding Host request header
[DEBUG] wire - ->> "Connection: Keep-Alive[\r][\n]"
[DEBUG] wire - ->> "Authorization: Basic enVsZmk6enVsZmk=[\r][\n]"
[DEBUG] wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0beta1[\r][\n]"
[DEBUG] wire - ->> "Host: localhost:9999[\r][\n]"
[DEBUG] wire - ->> "[\r][\n]"
[DEBUG] wire - -<< "HTTP/1.0 401 Access Denied[\r][\n]"
[DEBUG] wire - -<< "WWW-Authenticate: NTLM[\r][\n]"
[DEBUG] wire - -<< "Content-Length: 24[\r][\n]"
[DEBUG] wire - -<< "Content-Type: text/html[\r][\n]"
[DEBUG] HttpMethod - -Authorization required
[DEBUG] HttpAuthenticator - -Using 'localhost:9999' authentication realm
[DEBUG] HttpMethod - -HttpMethodBase.execute(): Server demanded authentication 
credentials, will try again.
[DEBUG] wire - -<< "Error: Access is Denied."
[DEBUG] HttpMethod - -Resorting to protocol version default close connection policy
[DEBUG] HttpMethod - -Should close connection, using HTTP/1.0.
[DEBUG] HttpMethod - -Execute loop try 2
[DEBUG] HttpMethod - -Opening the connection.
[DEBUG] wire - ->> "GET / HTTP/1.0[\r][\n]"
[DEBUG] HttpMethod - -Request to add Host header ignored: header already added
[DEBUG] wire - ->> "Connection: Keep-Alive[\r][\n]"
[DEBUG] wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0beta1[\r][\n]"
[DEBUG] wire - ->> "Host: localhost:9999[\r][\n]"
[DEBUG] wire - ->> "Authorization: NTLM 
TlRMTVNTUAABAAAABlIAAAcABwAuAAAADgAOACAAAAAxNjQuOTkuMjAwLjExN0pCUk9LRVI=[\r][\n]"
[DEBUG] wire - ->> "[\r][\n]"
[DEBUG] wire - -<< "HTTP/1.0 401 Access Denied[\r][\n]"
[DEBUG] wire - -<< "WWW-Authenticate: NTLM 
TlRMTVNTUAACAAAABwAHACgAAAAGAgEApc/XZoSW+10AAAAAAAAAAEpCUk9LRVI=[\r][\n]"
[DEBUG] wire - -<< "Connection: keep-alive[\r][\n]"
[DEBUG] wire - -<< "Content-Length: 24[\r][\n]"
[DEBUG] wire - -<< "Content-Type: text/html[\r][\n]"
[DEBUG] HttpMethod - -Authorization required
[DEBUG] HttpAuthenticator - -Using 'localhost:9999' authentication realm
[DEBUG] HttpMethod - -HttpMethodBase.execute(): Server demanded authentication 
credentials, will try again.
[DEBUG] wire - -<< "Error: Access is Denied."
[DEBUG] HttpMethod - -Should NOT close connection in response to Connection: keep-alive

[DEBUG] HttpMethod - -Execute loop try 3
[DEBUG] wire - ->> "GET / HTTP/1.0[\r][\n]"
[DEBUG] HttpMethod - -Request to add Host header ignored: header already added
[DEBUG] wire - ->> "Connection: Keep-Alive[\r][\n]"
[DEBUG] wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0beta1[\r][\n]"
[DEBUG] wire - ->> "Host: localhost:9999[\r][\n]"
[DEBUG] wire - ->> "Authorization: NTLM 
TlRMTVNTUAADAAAAGAAYAFoAAAAAAAAAcgAAAAcABwBAAAAABQAFAEcAAAAOAA4ATAAAAAAAAAByAAAABlIAAEpCUk9LRVJaVUxGSTE2NC45OS4yMDAuMTE3fAGOcZBmykBT1Tg7pVHny7HNkqKRMke5[\r][\n]"
[DEBUG] wire - ->> "[\r][\n]"
[DEBUG] wire - -<< "HTTP/1.0 401 Access Denied[\r][\n]"
[DEBUG] wire - -<< "WWW-Authenticate: NTLM[\r][\n]"
[DEBUG] wire - -<< "Content-Length: 24[\r][\n]"
[DEBUG] wire - -<< "Content-Type: text/html[\r][\n]"
[DEBUG] HttpMethod - -Authorization required
[INFO] HttpMethod - -Already tried to authenticate to "localhost:9999#" but still 
receiving 401.
[DEBUG] wire - -<< "Error: Access is Denied."
[DEBUG] HttpMethod - -Resorting to protocol version default close connection policy
[DEBUG] HttpMethod - -Should close connection, using HTTP/1.0.
[DEBUG] HttpMethod - -buffering response body
[DEBUG] HttpMethod - -Default charset used: ISO-8859-1
Error: Access is Denied.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to