Hi all-
Quick question, I think the answer is Yes, but I just wanted to confirm...
Can one single IW application (service) support both HTTP and HTTPS ?
[ilink32 Fehler] Error: Nicht auflösbares externes '__fastcall Iwservercontrollerbase::TIWSSLOptions::SetPortA(const int)' referenziert von ...\WIN32\DEBUG\SERVERCONTROLLER.OBJ
[ilink32 Fehler] Error: Linken kann nicht ausgeführt werden
As of version IW15.5.4, the port property function has been changed in IWServerControllerBase.hpp:
old: __property int Port = {read=FPort, write=FPort, default=0};
new: __property int Port = {read=FPort, write=SetPort, default=0};
Unfortunately, the pragma entry required to redirect the property functions SetPortA()/SetPortW is missing.
(please refer //-- user supplied --)
Back in 2018-2019 I wrote a commit emailer for our SVN server using Lazarus/FPC and Indy 10.6.2.
It retrieves the data from SVN and packages it into a message sent to the subscribed developers using a mailserver on my ISP.
I have created a specific email account on the ISP for this purpose and this requires SSL login for sending which is done using the code below.
The mailer has worked flawlessly for all the time since then until mid-December 2023 when the emails stopped coming.
Now I have finally found the logfiles for the mailer and this is what is reported upon each sending:
Code:
20240111 17:13:35.343 Connecting to mailserver
20240111 17:13:36.590 EXCEPTION: In SendSvnMessage = Error connecting with SSL.
error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version
So it seems to be a problem with SSL negotiations here and now I am at a loss as to where I can start finding the reason for this and a solution.
The actual code where the sending is done looks like this:
function TSvnMessage.SendSvnMessage: boolean;
var
sSubject: string;
i: integer;
begin
Result := false;
try
PrepareMessage;
if (FMailMessage.Sender.Address = '') and (FMailMessage.From.Address = '') then
begin
LogError('No sender! Cannot send email!');
exit;
end;
if FMailMessage.Recipients.Count = 0 then
begin
LogError('No recipients! Cannot send email!');
exit;
end;
//Set up the SMTP transfer properties
FSMTP.Port := FMailPort;
FSMTP.Host := FMailServer;
FSMTP.AuthType := satDefault;
FSMTP.Username := FMailLogin;
FSMTP.Password := FMailPwd;
FSMTP.MailAgent := 'SVNMailer';
if FMailUseSSL then
begin
FSMTP.IOHandler := FSSLHandler;
FSMTP.UseTLS := utUseImplicitTLS;
FSSLHandler.Port := FMailPort;
end;
FSMTP.ConnectTimeout := FMailTimeout;
//Check message subject for illegal chars
if Length(FMailMessage.Subject) > 76 then
begin
sSubject := FMailMessage.Subject;
for i := 1 to Length(sSubject) do
begin
if Ord(sSubject[i]) > 127 then
sSubject[i] := '?';
end;
FMailMessage.Subject := sSubject;
end;
//Now send message
Log('Connecting to mailserver');
FSMTP.Connect;
if FSMTP.Connected then
begin
Log('Sending message');
FSMTP.Send(FMailMessage);
Log('Send done');
FSMTP.Disconnect();
Result := true;
end;
except
on E: Exception do
begin
LogException('In SendSvnMessage = ' + E.Message);
end;
end;
end;
Since it has worked for these many years there must be some change either in the Windows Server 2016 where it runs or else in the mail server configuration, but where should I start looking?
For instance if the mail server requires a later version of SSL, how can I fix that in my program?
Note:
This is the same problem I was looking for a work-around to and asked here about earlier.
See thread Change report from send email to post to a php handler
I'd rather have the modification done in the existing mailer than going that route, though...
Included here is a FileZilla log of what I see when using it to connect.
While it uses TLS 1.3 here, TLS 1.2 is allowed also. Just don't see anyway in FileZilla to force 1.2... which really i don't think matters here, as it would be SChannel object doing that work?
This is a program that just connects to a few servers and doesn't really need to know or care about every single conneciton type under the sun that could exist.
But I am failing to get far.
Using Delphi 11.3 with Indy that comes installed along with SChannel object.
I have zero say / control of the server.
And to mention again, OpenSSL is NOT an option.
Problem could be in TIdSSLIOHandlerSocketSChannel possibly?
If it is, ill have to switch us sadly to another FTP component that can work with these servers and not be OpenSSL dependent.
Would be sad, as we've been using TIDFTP for 20 years or more now.
But I know I have to be missing some stuff here. But google searching and ChatGTP keeps getting me into unsable states also, so last resort was here.
Source Snippet , I get to list and it fails.
In the end I need to upload a file and download a file.
Code:
IdFTP1 := tidftp.Create(nil);
ssl := TIdSSLIOHandlerSocketSChannel.Create(nil);
ssl.ReuseSocket := rsTrue; // <--- just added this recently , not sure need this at all, doesnt change anything
if IdFTP1.SupportsTLS then
begin
Memo1.lines.add('TLS IS SUPPORTED');
idftp1.DataPortProtection := ftpdpsPrivate;
end
else
Memo1.lines.add('TLS IS NOT SUPPORTED');
I have several grids using TIWjQDBGrid component that shows data on a IWBSmodal window.
After TIWjQDBGrid was changed to use latest version of jQuery UI, the navigation buttons do not appear, are not showed.
I have a table with 50 records, with several pages, but the buttons aren't showed. They are there, because if I go with the mouse pointer and search for them in the place where they should be, I have a glance of them, but they are too small.
Also I always have the problem that I can only show the data on the grid, using a IWTimer to do a grid refresh and even so, I need two grid refreshs, one on then IWTimer1AsyncTimer event and another on the IWFrameRegionAsyncShow (of IWBSMoldal). If I remove one of them, the data is not showed.
What am I doing wrong? What am I missing? Maybe the files that I must download for this component to work properly, because I don't have RenderCDNFiles enabled.
If so, which files do I need and from where can I download them?
Also, how can I set the number of records that are showed by page?
I attach a simple test case, for maybe Alexandre or anyone could help.