| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 82,868
» Latest member: w88idlive
» Forum threads: 2,408
» Forum posts: 11,315
Full Statistics
|
| Online Users |
There are currently 614 online users. » 4 Member(s) | 607 Guest(s) Bing, Google, Yandex, go88vip2, w88idlive
|
| Latest Threads |
IW 16.2.0 Missing librari...
Forum: IntraWeb General Discussion
Last Post: Gregory_Twedt
06-24-2026, 04:40 AM
» Replies: 5
» Views: 693
|
VCL conversion
Forum: Delphi General Discussion
Last Post: tobenschain
06-20-2026, 05:00 AM
» Replies: 0
» Views: 97
|
TIWjQDBGrid changing UI
Forum: IntraWeb General Discussion
Last Post: BoostedCruiser
06-08-2026, 02:02 AM
» Replies: 36
» Views: 70,539
|
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: Fabrizio Conti
06-04-2026, 09:14 AM
» Replies: 3
» Views: 517
|
Access Violation When Val...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
06-03-2026, 08:47 AM
» Replies: 2
» Views: 539
|
Bootstrap5
Forum: IntraWeb General Discussion
Last Post: geraldtatum
06-02-2026, 06:24 AM
» Replies: 1
» Views: 438
|
weakpackageunit contains ...
Forum: IntraWeb General Discussion
Last Post: rlebeau
05-26-2026, 04:56 PM
» Replies: 4
» Views: 588
|
Custom 404 handler
Forum: IntraWeb General Discussion
Last Post: CfawesDwale
05-21-2026, 08:02 AM
» Replies: 0
» Views: 275
|
PopUp Menu
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
05-13-2026, 04:35 AM
» Replies: 4
» Views: 8,239
|
Image question on tiwjqdb...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
05-13-2026, 03:32 AM
» Replies: 3
» Views: 4,144
|
|
|
| Compression problems |
|
Posted by: BartKindt - 10-16-2018, 08:34 PM - Forum: Indy
- Replies (2)
|
 |
I need to compress-decompress streams just before Indy transmits them.
There is a reason I want to do this manually, instead of using the Indy IdCompressionIntercept, but I still use the Indy functions:
CompressStreamEx(InStream, OutStream, clMax, zsGZip);
and
DecompressStream(InStream, OutStream);.
The problem is, the compression works perfectly, and I can save the Stream to disk, and a 3th party unzip program correctly detect the zip format, and can decompress it.
But when I call DecompressStream(InStream, OutStream), I get a "ZLib Error (-5)" in
IdZLib:
class procedure EZlibError.RaiseException(const AError: Integer);
var
LException: EZlibError;
begin
LException := CreateFmt(sZLibError, [AError]);
LException.FErrorCode := AError;
raise LException;
end;
I tried 3 different IdZLibHeaders but no difference.
I cannot find any documentation on the error, and it also does not show where it actually occurs.
Why is the Decompression not working?
Delphy 10.2.3
Bart
|
|
|
| http.sys & ssl on ssllabs get C rating (vulnerable) |
|
Posted by: ioan - 10-16-2018, 07:40 AM - Forum: IntraWeb General Discussion
- Replies (7)
|
 |
After changing one of my applications to use http.sys, the ssllabs rating went from A to C (vulnerable). Any idea why is this and what settings I have to make to get a better rating?
Well, it seems that I always find the answer after I post my question here :-)
This article explains what changes need to be made to get an A rating. You can also run the Powershell script from the article and it does all the changes. Now the mission for A+ rating begins.
|
|
|
| Could not compile ServerController.pas |
|
Posted by: gerieli7@gmail.com - 10-15-2018, 02:03 PM - Forum: IntraWeb General Discussion
- Replies (1)
|
 |
I am using Delphi 10.2 with IW 14.2.7 /
Don't know what happened when i wanted to recompile any IW program I got this error message:
[dcc32 Error] ServerController.pas(49): E2034 Too many actual parameters.
[dcc32 Fatal Error] Pr_NEW_REQI.dpr(10): F2063 Could not compile used unit 'ServerController.pas'
This error message came to me also when creating new IW app with nothing inside.
I am new to the use of intraweb and I have only one small application.
Hope to get some help here.
Thank in advance.
Eliyahu
|
|
|
| Using IdTcpClient for logging data (Lazarus/Fpc) |
|
Posted by: BosseB - 10-13-2018, 07:53 AM - Forum: Indy
- No Replies
|
 |
I need to write a small utility for receiving logging data from an embedded WiFi device.
The device (based on ESP8266) is programmed to work as a TCP<=>Serial bridge for channeling data between a data collection unit and a network connected master (can be a PC program or an Android App using TCP socket communications).
We have problems in certain operating modes with the device and so I need to check the data handled by the device. Dropped bytes is a killer here...
So I added two TCP servers to the device each listening on different ports and dedicated to log data sent to and from the serial port of the device. Every time there is any data in either of these sources it will be sent to the logging client in addition to the relaying destination.
Now I need to add two instances of a "logging client" to my configuration program (written with Lazarus/FPC and using the indylaz package components) and the plan is to do this as follows:
- Write a TCP logging class I can instantiate twice for the two logging directions
- Each class instance shall connect to the server on one of the two ports dedicated for logging
- While connected it shall wait for incoming data and dump all received bytes to a log file.
- The running count of the received bytes shall be reported to the main application for display (event function)
In order to do the above I probably need to use a threaded approach since I must keep the application live and responsive.
But I have not succeeded to find any good example to start from where the TCP client is threaded and does not send anything at all by itself, it shall just receive and write to disk whatever comes along. And generate an event with the current byte count.
Any suggestions on how this can be accomplished?
This is as far as I have come as of now:
Code: type
TRxEvent = procedure (const Buffer: TIdBytes) of object;
{ TWiFiCommLogger }
TWiFiCommLogger = class(TThread)
private
FComm: TIdTcpClient;
FServer: string;
FPort: TIdPort;
FTcpConnected: boolean;
FOnRxData: TRxEvent;
FBuffer: TIdBytes;
FActive: boolean;
procedure OnConnected(Sender: TObject);
procedure OnDisConnected(Sender: TObject);
protected
procedure Execute; override;
public
constructor Create;
destructor Destroy; override;
procedure Connect(Server: string; Port: word);
procedure Disconnect;
property Active: boolean read FActive write FActive;
property Connected: boolean read FTcpConnected;
property OnRxData: TRxEvent read FOnRxData write FOnRxData;
end;
implementation
{ TWiFiCommLogger }
procedure TWiFiCommLogger.OnConnected(Sender: TObject);
begin
FTcpConnected := true;
end;
procedure TWiFiCommLogger.OnDisConnected(Sender: TObject);
begin
FTcpConnected := false;
end;
procedure TWiFiCommLogger.Execute;
begin
while not Terminated do
begin
if FActive and FTcpConnected then
begin
//What do I put here?
FComm.IOHandler.ReadBytes(FBuffer, -1, true); //Append indata to buffer
if Length(FBuffer) > 0 then
if Assigned(FOnRxData) then
begin
FOnRxData(FBuffer); //Data are supposed to be saved in the main thread
SetLength(FBuffer, 0); //So after executing the evnt procedure, erase existing data
end;
end;
end; //while
end;
constructor TWiFiCommLogger.Create;
begin
FActive := false;
FComm := TIdTCPClient.Create(NIL);
FComm.IPVersion := Id_IPv4;
FComm.ReadTimeout := 100;
FComm.ConnectTimeout := 5000;
FTcpConnected := false;
FComm.OnConnected := OnConnected;
FComm.OnDisconnected := OnDisconnected;
end;
destructor TWiFiCommLogger.Destroy;
begin
if Connected then
Disconnect;
FComm.Free;
inherited Destroy;
end;
procedure TWiFiCommLogger.Connect(Server: string; Port: word);
begin
FServer := Server;
FPort := Port;
FComm.Connect(FServer, FPort);
end;
procedure TWiFiCommLogger.Disconnect;
begin
FComm.Disconnect;
end;
Usage in main form:
Code: procedure TfrmCommTest.FormCreate(Sender: TObject);
begin
...
FLogSS := TWiFiCommLogger.Create;
FLogSS.OnRxData := OnRxSS;
...
end;
procedure TfrmCommTest.btnStartLogClick(Sender: TObject);
begin
if (FLogSS.Connected and FLogSSM.Connected) then
begin
FLogSS.Active := false;
FLogSS.Disconnect;
ledLog.Brush.Color := clRed;
btnStartLog.Caption := 'Start Log';
end
else
begin
FLogSS.Connect(edAddress.Text, speTcpPort.Value + 10);
if FLogSS.Connected then
begin
ledLog.Brush.Color := clLime;
btnStartLog.Caption := 'Stop Log';
FLogSS.Active := true;
end;
end;
end;
procedure TfrmCommTest.OnRxSS(const Buf: TBytes);
var
len, lbuf: integer;
begin
len := Length(Buf);
lbuf := Length(FLogBufSS);
SetLength(FLogBufSS, lbuf + len);
Move(Buf[0], FLogBufSS[lbuf], len); //Append data to log buffer
SaveLogFile(Buf); //Append data to file
SetLength(Buf, 0); //Clear data after save
FSSDataRx := true;
end;
The data received (into a TIdBytes container) is sent to the main thread in the event function if defined to be stored into a file (file save not shown above).
Do I need some exception handling inside the Execute method?
|
|
|
| TIdFTP.ConnectTimeout |
|
Posted by: rhcarpenter - 10-11-2018, 01:38 AM - Forum: Indy
- Replies (3)
|
 |
I recently upgraded my Indy components to Indy v10.6.2.0.
Since installing Indy v 10.6.2.0 I am receiving the following when attempting to open a new form on which I have dropped a TIdFTP component.
ERROR: Error reading FTPClient.ConnectTimeout: Property ConnectTimeout does not exist
yet when I look in the object inspector, ConnectTimeout is a valid property set to zero.
I was told I probably have multiple Indy versions installed on my machine. How do I determine if this is the case and if so, how do I fix it?
Your help will be appreciated.
Thanks,
Randall H. Carpenter
|
|
|
| Confirm Bug in IWBootstrap |
|
Posted by: LorenSzendre - 10-10-2018, 10:32 PM - Forum: IntraWeb General Discussion
- No Replies
|
 |
Could a few of youz check IWBSCommon around line 563 and see if this isn't a massive bug:
if LT > LF then
The code is indented as if the author intended the next block to be scoped, and not just the next line.
I think there is a begin missing here.
|
|
|
| Enforce session timeout without user interaction |
|
Posted by: rchristi12 - 10-10-2018, 08:57 PM - Forum: IntraWeb General Discussion
- Replies (1)
|
 |
I am using Delphi 10.1 Berlin with IntraWeb 14.2.3. We have an application running as as ISAPI dll in IIS. We are using the session timeout value (15 minutes) in the Server Controller which works, however it requires user action to trigger it. In other words if the session times out and a user tries to do something they are redirected to a static html page indicating that their session has timed out and that they are required to log back in. We really need the session timeout enforced and page redirect to occur even if no user activity occurs during the timeout period. This is required for security purposes. I have tried using the TIWTimer control with the onTimer event, however I don't know how to reset it if the user takes action on the screen such as clicking buttons. It seems to start the timer when the form is first loaded. Does anyone know how to address this situation? Is there another option in IntraWeb 15? Also we have hundreds of forms so even if the timer option works it is not ideal since we would need to modify every form and add the timer functionality to it. Thanks.
|
|
|
|