RTC Forums

Subscription => Support => Topic started by: xstarter on July 02, 2019, 11:53:16 AM



Title: Problem with TRtcDataRequest and https in Windows 2003
Post by: xstarter on July 02, 2019, 11:53:16 AM
Hello,

My project make requests to webservers via HTTPs (property RtcDataRequest.UseSSL=True). It works well everywhere, but not in Windows 2003.
In Windows 2003 it got a message:
RtcHttpClientException Error Sending the Request [Code #12157].

I have use RealThinClient SDK v9.50. How it possible to fix this problem? Thanks in advance.

Test project (Delphi XE) available here:
https://cloud.mail.ru/public/Bp9z/i75LVEhJC



Title: Re: Problem with TRtcDataRequest and https in Windows 2003
Post by: D.Tkalcec (RTC) on July 02, 2019, 12:07:46 PM
According to this MSDN article (https://docs.microsoft.com/en-us/windows/desktop/WinInet/wininet-errors), 12157 is a WinInet error code for ERROR_INTERNET_SECURITY_CHANNEL_ERROR, which basically means that the application experienced an internal error loading the SSL libraries. Since that is a WinInet API issue, there is not much I can do about it, but ... you could try using the WinHTTP API on that PC by setting "useWinHTTP=TRUE" on the TRtcHttpClient component, or ... you could try using 3rd-party encryption components (StreamSec Tools) for SSL encryption on that PC.


Title: Re: Problem with TRtcDataRequest and https in Windows 2003
Post by: D.Tkalcec (RTC) on July 02, 2019, 12:32:30 PM
I'm not sure if that is related, but ... I just remembered that there are two global variables which define how the TRtcHttpClient component uses SSL with WinInet and WinHTTP APIs. One is RTC_WINET_SECURITY_FLAGS in the rtcWInetHttpCliProv.pas unit (used with the WinInet API), the other is RTC_WINHTTP_SECURITY_FLAGS in the rtcWinHttpCliProv.pas unit (used with the WinHTTP API). If the Web Server you are connecting to has specific requirements for SSL, you might have to change the value of these variables to get the Client to work with your Web Server over SSL. In addition to the above, the WinHTTP API also has a security level, which is defined by setting the RTC_WINHTTP_AUTOLOGON_SECURITY_LEVEL global variable in the rtcWinHttpCliProv.pas unit.