Discussion:
Use of pre-configured Proxy settings with wininet
(too old to reply)
Rahul
2006-05-13 10:53:08 UTC
Permalink
Hi,

Can any body give me some visibility about how to manage NTLM authentication
while establishing a connection with a proxy server?

I am using following API to establish a connection with WebService:
m_hInternet = InternetOpen(ATLSOAPINET_CLIENT, m_strProxy.GetLength() ?
(INTERNET_OPEN_TYPE_PRECONFIG | INTERNET_OPEN_TYPE_PROXY) :
INTERNET_OPEN_TYPE_PRECONFIG,m_strProxy.GetLength() ? (LPCTSTR) m_strProxy :
NULL,NULL, 0);

InternetSetOption(m_hInternet,
INTERNET_OPTION_PROXY_USERNAME,m_strProxyUserName.GetBuffer(),
m_strProxyUserName.GetLength());
InternetSetOption(m_hInternet,
INTERNET_OPTION_PROXY_PASSWORD,m_strProxyPassword.GetBuffer(),
m_strProxyPassword.GetLength());

IMO, strProxyUserName, strProxyPassword are responsible in carrying UID/PWD
for proxy server in plain text, but for proxy with NTLM authentication
system is there any specific way?



Regards,
Rahul Gade
Kellie Fitton
2006-05-15 18:18:13 UTC
Permalink
Hi,

You can use the following API to create an HTTP request handle,
and to manage the NT LAN Manager (NTLM), and other types of
authentication:

HttpOpenRequest() using INTERNET_FLAG_KEEP_CONNECTION

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/httpopenrequest.asp

Hope these suggestions helps,

Kellie.

Loading...