RTC Forums
May 14, 2024, 05:17:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: TRtcHttpClient and Proxy with NTLM authentication  (Read 3599 times)
Nanosystems
RTC License++
*****
Posts: 9


« on: September 23, 2016, 02:09:59 PM »

I'm trying to use the TRtcHttpClient component with Squid Proxy - NTLM Authentication.
If I check only the "UseProxy" property everything works fine (I suppose that it takes the proxy settings from IE and credentials from windows login), but if I specify manually the proxy address, the port, the username and the password it doesn't work.
I need to run the application as a windows service (SYSTEM user), so I need to specify the proxy settings manually.

Is it possible to do that with RealThinClient? If I use a simple TIdHTTP Indy component, I'm able to authenticate through NTML Proxy even from a windows service (SYSTEM user)
Where am I wrong?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: September 23, 2016, 02:44:27 PM »

WinInet API gets its settings from Internet Explorer, for which the user has to be logged in, making it unsuitable for Windows Services. Use the WinHTTP API for Windows Services by setting "useWinHTTP:=TRUE".

WinHTTP API can either be configured with the "UserLogin" property (TRtcHttpClient component),
or directly from Windows by using "netsh" in Windows Console (Google "WinHTTP configuration"):
http://superuser.com/questions/489527/how-can-i-configure-proxy-settings-for-all-apps-system-ie-etc

----
Here is a copy/paste from the link above (in case the page should dissapear later) ...

To configure a system wide proxy do (from a Windows Command Prompt -> CMD)
  netsh winhttp set proxy myproxy

Source: http://technet.microsoft.com/pt-br/library/cc731131(v=ws.10).aspx#BKMK_5

if you want to use IE proxy settings for all programs, try
  netsh winhttp import proxy source=ie

Source: http://technet.microsoft.com/pt-br/library/cc731131(v=ws.10).aspx#BKMK_2

For more information, check:
  https://msdn.microsoft.com/en-us/library/windows/desktop/aa384069(v=vs.85).aspx

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.033 seconds with 17 queries.