|Subject:||Re: NTLM proxy authentication? Example please?|
|Posted by:||John Cox (newsgrou…@jcentdotcom.notthispart)|
|Date:||Mon, 8 Aug 2005|
FYI: My application uses TidHTTP components to "get" files from many web
servers as part of its normal operation. I have many users in a dozens of
different corporate and government environments. Some installations use
HTTP proxy servers. Of those, some require authentication, usually using
Windows integrated security (this is NTLM, I guess).
I'd like my application to handle proxy servers (and whatever authentication
that's necessary) transparently to the user.
So far, I've been able to determine the proxy settings from WinInet, using
InternetQueryOption(). I set the server and port in ProxyParams and things
work OK when authentication is not required.
Now, how do I authenticate to the proxy server? My user is already logged
into windows and has no trouble browsing with IE. Their IT guy says the
proxy is set up to use NTLM.
This code works fine when using proxies that do not require authentication
and when no proxy is used at all. What must I change/add to get it to work
with NTLM authenticated proxy servers?
HTTP := TidHttp.Create(nil);
SetProxy(HTTP);//this sets ProxyParams, if needed
Result := Http.Get(aURL);
on E:Exception do
Result := '';
NTLM proxy authentication? Example please? posted by John Cox on Mon, 8 Aug 2005