Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 325 online users. » 1 Member(s) | 322 Guest(s) Bing, Google, digitalsamay
|
Latest Threads |
ClassicRegionDraw
Forum: IntraWeb General Discussion
Last Post: JuergenS
04-17-2024, 05:35 PM
» Replies: 0
» Views: 86
|
CompressorImplementation
Forum: IntraWeb General Discussion
Last Post: JuergenS
04-17-2024, 05:27 PM
» Replies: 0
» Views: 85
|
IntraWeb 15.6.0 is out!
Forum: IntraWeb General Discussion
Last Post: Comograma
04-17-2024, 11:54 AM
» Replies: 11
» Views: 616
|
How to manage forms and v...
Forum: IntraWeb General Discussion
Last Post: David1
04-17-2024, 10:37 AM
» Replies: 0
» Views: 80
|
iwjqdbgrid button example
Forum: IntraWeb General Discussion
Last Post: joelcc
04-16-2024, 09:07 PM
» Replies: 0
» Views: 99
|
New demo available
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
04-16-2024, 03:54 AM
» Replies: 0
» Views: 140
|
IW 15.5.9 IWChart
Forum: IntraWeb General Discussion
Last Post: PaulWeem
04-15-2024, 12:50 PM
» Replies: 0
» Views: 119
|
Multipage websocket commu...
Forum: IntraWeb General Discussion
Last Post: davidbaxter
04-15-2024, 02:39 AM
» Replies: 5
» Views: 766
|
TIWServerControllerIniRea...
Forum: IntraWeb General Discussion
Last Post: Lorbass
04-12-2024, 10:59 AM
» Replies: 0
» Views: 142
|
Resize problems with IW 1...
Forum: IntraWeb General Discussion
Last Post: Lorbass
04-12-2024, 10:47 AM
» Replies: 9
» Views: 803
|
|
|
Porting old Delphi2007 application using TServerSocket.... |
Posted by: BosseB - 07-05-2020, 01:08 PM - Forum: Indy General Discussion
- Replies (24)
|
|
So I have this old service application written in Delphi7 and maintained in Delphi2007 until about 2012.
Now it won't run anymore in Windows10 and I have decided to try a port to FreePascal so it can run on Linux.
The Indy10 suite is available in Lazarus as a package via Online Package Manager.
The server uses a TCP socket connection for user interaction (mainly configuration and data retrieval) and it was implemented at the time using TServerSocket that came with Delphi.
This won't obviously port so I thought that I could use Indy10 instead for that interface.
TIdTcpServer seems to be a natural replacement except for the fact that the TServerSocket is event driven...
The existing structure is a TService descendant which implements the Windows service. I know how to handle conversion to Linux for that.
But I would like some help into how I can port the communications between the remote client and the server using TidTcpServer.
This server uses TServerSocket in order to handle the communications and it implements the following event procedures:
Code: sckServer: TServerSocket;
....
procedure sckClientConnect(Sender: TObject; Socket: TCustomWinSocket);
procedure sckClientDisconnect(Sender: TObject; Socket: TCustomWinSocket);
procedure sckClientRead(Sender: TObject; Socket: TCustomWinSocket);
procedure sckClientError(Sender: TObject; Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer);
The sckClientConnect procedure handles the client connection and incoming commands as follows:
Code: procedure TSuperStingRemoteServer.sckClientConnect(Sender: TObject; Socket: TCustomWinSocket);
{Create the remote handler and assign the communication to it}
var
SSRC: TSSRemoteClientComm; //The communications object
i: integer;
begin
try
FActivityTime := Now;
i := sckServer.Socket.ActiveConnections;
Log3RServer.StdLog('Active clients = ' + IntToStr(i));
if i > 1 then
begin
Log3RServer.StdLog('Only one active client allowed!');
Socket.Close;
Exit;
end;
Log3RServer.StdLog('SSRemote - Client connect, IP=' + Socket.RemoteAddress + ' Host=' + Socket.RemoteHost);
SSRC := TSSRemoteClientComm.Create(Socket, FRemoteServer);
Socket.Data := SSRC; {Keep pointer to handler with socket}
SSRC.Log := Log3RComm;
FRemoteServer.ClientCallback := SSRC.ClientCallback;
Log3RServer.StdLog('SSRemote - initializing new SSRemote Client');
SSRC.Initialize;
SSRC.Log.StdLog('Socket communication channel opened to ' + Socket.RemoteAddress + ' Host=' + Socket.RemoteHost);
except
on E: Exception do
begin
Log3RServer.ErrLog('Exception during client connect: ' + E.Message);
end;
end;
end;
procedure TSuperStingRemoteServer.sckClientDisconnect(Sender: TObject; Socket: TCustomWinSocket);
begin
FRemoteServer.ClientCallback := NIL;
LogStd('Client disconnect ' + Socket.RemoteAddress);
FActivityTime := Now;
if Socket.Data <> NIL then
begin
TSSRemoteClientComm(Socket.Data).OnDisconnect(Socket);
TSSRemoteClientComm(Socket.Data).Free;
end;
end;
procedure TSuperStingRemoteServer.sckClientRead(Sender: TObject; Socket: TCustomWinSocket);
var
RdData: string;
begin
{Implement the socket data flow here by using the Data pointer to the handling object}
RdData := Socket.ReceiveText;
FActivityTime := Now;
if Socket.Data <> NIL then
TSSRemoteClientComm(Socket.Data).OnDataRead(RdData);
end;
procedure TSuperStingRemoteServer.sckClientError(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer);
begin
{Implement the socket error handling here}
LogErr('Socket error detected, code: ' + IntToStr(ErrorCode));
ErrorCode := 0; {To stop the socket from generating pop-up errors}
end;
So this system acts really just like a pass-through to the real communications object class dealing with all of the messaging and data transfers etc using the supplied socket when it was created.
Since Indy does not use events, how can I adapt this from TServerSocket to TidTcpServer?
Hopefully I will not have to modify too much inside the handler itself provided the network interface shown above is ported with the messaging in mind...
Note that the sckClientRead retrieves the client command text and just shuffles it over to the handler's OnDatRead method that takes the text as parameter, so it should really be decently simple provided one can get the receive text event off of the TidTcpServer object....
Grateful for any suggestions, it was quite a while since I wrote this application (started in 2004)....
|
|
|
JQGrid |
Posted by: Alain.verdier - 07-03-2020, 01:18 PM - Forum: IntraWeb General Discussion
- Replies (2)
|
|
Hello,
I have a static website (no internet access) and wonder what I need to download in order to use TIWJQGrid.
I did a search on the web, but it seems to me that the versions are paid
thank you
Have a good day
|
|
|
Style transform property |
Posted by: valmeras - 07-02-2020, 05:43 PM - Forum: IntraWeb General Discussion
- Replies (1)
|
|
I am using Intraweb 14.2.7 with Rad Studio (C++ Builder) 10.2.3
I am trying to shrink a IWRegion using transform: scale. But it does not work:
document.getElementById("IWREGION1").style.transform = "scale(0.5,0.5)";
But it does not work. Nothinh happen.
Is it normal ?
|
|
|
IW10 open IW14 Form (dll) |
Posted by: alex.trejo@tttnet.com.mx - 06-30-2020, 12:11 AM - Forum: IntraWeb General Discussion
- Replies (8)
|
|
Hi,
We are preparing to migrate a large D2009/IW10 isapi application to a more recent dev environment (10.2.3/IW14.2.6 which we already have or possible go to IW15).
We would like to have the possibility to keep the current IW10 app as entry point, create a new IW14 dll that could be referenced from IW10 app and where we have migrated and new forms. So, when we have a new form migrated, we call the new IW14 version from within the IW10 app. Is something like this possible with IW? When I In VCL it is possible to include an external dll library which opens new forms, but when trying it in IW it throws AV.
How can we accomplish this? We want to keep/pass user information from IW10 app to IW14 forms.
Thanks
Alex
|
|
|
IW 10.0.17 ExecCMD e Proxy |
Posted by: cleversonviana - 06-29-2020, 12:23 PM - Forum: IntraWeb Dúvidas Gerais
- No Replies
|
|
Utilizamos a versao antiga do Intraweb 10.0.0.17 e para atualizarmos para nova versão seria algo muito complicado.
Estamos com o seguinte problema:
Estamos querendo utilizar NGINX como proxy e redirecionar os nossos sistemas da seguinte forma:
www.site.com.br/teste -> http://www.outrodomain.com:7000
Porém, quando fazemos isto no intraweb que temos, por causa do ServerController.ExecCmd, ele fica num loop e nao consegue chegar no destino.
Como fazemos para um suporte de forma que consiga nos dar uma solução para este problema, de forma que possamos manter a versão atual do IW que temos?
|
|
|
Not a valid time format? |
Posted by: Mikael Nilsson - 06-29-2020, 10:44 AM - Forum: IntraWeb General Discussion
- Replies (11)
|
|
Hi,
We have moved to new servers.
OS Name Microsoft Windows Server 2016 Standard
Delphi 10.3.3
Intraweb 15.2.3
TMS Intraweb 5.9.10
Using Interbase 2017
Firedac components.
I can't see anything wrong with the date format. Can you?
The problem is that we in on one of the forms we get:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
in 99.99% . (sometimes we succeeds to get a result set showing in the TMSgrid.)
Error details:
Exception message : '2020-06-29 12:29:03.4500' is not a valid date and time
Depending on the error condition, it might be possible to restart the application.
Exception class : EConvertError
Exception address : 0676A8F6
Exception Time : 2020-06-29 12:29:36.995
------------------------------------------------------------------------------------------------------------------------
Application Name : isapiXIBwwd.dll
Application Version: 1.0.0.0
Started at : 2020-06-29 12:14:05.802
Running for : 15 minutes 31 seconds
Computer Name : P-W-WWD-WEB01
Compiler Version : 330
------------------------------------------------------------------------------------------------------------------------
IntraWeb Version : 15.2.3
Multi-session : False
Content Path : d:\wwwroot\customerzone.opuscapita.com\wwd\wwwroot\
Session count : 21
Application Path : d:\wwwroot\customerzone.opuscapita.com\wwd\
Active Form : frmWWD (TfrmWWD)
Active Form list : [1] frmLogon (TfrmLogon)
[2] frmWWD (TfrmWWD)
Form list : [1] IWUserSession (TIWUserSession)
[2] frmLogon (TfrmLogon)
[3] frmWWD (TfrmWWD)
Browser Name : Chrome
Browser UserAgent : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Session ID : cPWEejrIa55X0GvdS6Y23OGmkNG
Last Access : 2020-06-29 12:29:36.157
Callback : False
Runtime parameters :
------------------------------------------------------------------------------------------------------------------------
Client IP address : ::1
Request PathInfo : /
Request Method : POST
Request User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Cookies Count : 1
|
|
|
|