You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by pkbharigopal <pk...@yahoo.com> on 2009/04/08 18:26:21 UTC

Re: NTLM Proxy Authentication ISA Server

Dear oleg,
Sorry for my delay in response. I was away from town.
I was mistaken that I am able to connect to the Internal server through IE.
Even with IE it was not working. With bit of further googling, we found that
it is the problem with the ISA server configuration, where the firewall rule
is set to route to a non-standard ssl port for any internal addresses. 
Working with our network administrators for the same.

Thank you for your reply.
Regards,
Hari

olegk wrote:
> 
> On Thu, 2009-03-26 at 12:28 -0700, pkbharigopal wrote:
>> I am facing a strange problem in using HttpClient with ISA proxy server
>> that
>> supports NTLM.
>> The program I wrote successfully authenticate to proxy using NTLM and
>> retrieve pages if I connect to any external website (ex: www.yahoo.com)
>> both
>> using Http and Https (SSL).
>> 
>> The same program through same proxy also works fine, if I connect to an
>> internal host within our same corporate domain, if I use Http.  However,
>> it
>> gives 502.2 Bad Gateway error if I connect to the same host using Https
>> (SSL).
>> 
> 
> Are you using a custom SSL socket factory by any chance?
> 
> Post a complete wire log of the session
> 
> Oleg
> 
> 
>> I am able to successfully connect to that internal host using normal
>> browser
>> (IE) using both Http and Https (using same proxy).
>> 
>> Any help on this is highly appreciated.
>> 
>> The code I used is as follows:
>> 
>> HttpClient client = new HttpClient();
>> HostConfiguration config = client.getHostConfiguration();
>> config.setProxy(proxyHost, proxyPort);
>> 
>> NTCredentials credentials = new NTCredentials(userName, password, host,
>> domain);
>> HttpState state = client.getState();
>> state.setProxyCredentials(domain, proxyHost, credentials);
>> GetMethod httpget = new GetMethod("https://hostname/");
>> httpget.setDoAuthentication(true);
>> int status = client.executeMethod(httpget);
>> System.out.println(httpget.getStatusLine().toString());
>> ....
>> finally release connection..
>> 
>> Regards,
>> hari
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NTLM-Proxy-Authentication-ISA-Server-tp22729238p22954363.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org