-
Content Count
19 -
Joined
-
Last visited
Community Reputation
1 Neutral-
ICS V9.3 announced
Mark Lobanov replied to Angus Robertson's topic in ICS - Internet Component Suite
Hello Internal Error: URW1111 while compiling OverbyteIcsD2010Run.dproj or OverbyteIcsD2010Design.dproj in Delphi 2010 If i compile *.dpr I get the same error -
TSslHttpCli Request aborted on timeout in thread
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
Please, delete this topic. I found an error in another place -
TSslHttpCli Request aborted on timeout in thread
Mark Lobanov posted a topic in ICS - Internet Component Suite
Hello I have a Win64 ServiceApplication (no GUI) with separate thread which received a data from specific web-service. TSslHttpCli created and initialized within the thread constructor fHc := TSslHttpCli.Create( nil ); fHc.RcvdStream := TBytesStream.Create; fHc.SendStream := TBytesStream.Create; fHc.OnBeforeHeaderSend := hcBeforeHeaderSendHandler; fHc.OnCookie := hcOnCookieHandler; fHc.SocketFamily := sfAny; fHc.RequestVer := '1.1'; fHc.MultiThreaded := True; fHc.sslContext := TSslContext.Create( nil ); fHc.sslContext.SslMinVersion := sslVerTLS1_2; fHc.sslContext.SslMaxVersion := sslVerMax; fHc.sslContext.SslCliSecurity := TSslCliSecurity.sslCliSecTls12; fHc.sslContext.SslVersionMethod := sslBestVer_SERVER; fHc.Accept := MC_HTTP_ACCEPT_VALUE; fHc.Connection := MC_HTTP_CONNECTION_VALUE; fHc.Agent := MC_HTTP_USER_AGENT_VALUE; fHc.NoCache := True; fHc.ResponseNoException := True; In CallerThread.Execute a call a GET method in synchronous mode with OpenSsl 3.2.0. At first glance all works fine but a have a lot of errors "Request aborted on timeout". Remote web service is quite stable. Maybe I missed something? Please, help me. -
ICS & DelphiMVCFramework
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
Ok, thank you, François and Angus -
ICS & DelphiMVCFramework
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
I have a similar pattern but easier One session, one client data (metadata, authorization, cookie etc.), one TSslHttpCli objects per session lifetime. No pool, no concurrent access to TSslHttpCli objects. My problem is that the TSslHttpCli object is created in one thread and is used each time in another thread. On each second call TSslHttpCli objects freezes in httpDnsLookup state. I do not want to use the asynchronous mode of the object yet. DelphiMVCFramework endpoint call is already in asynchronous mode within separate thread. Besides I don't have access to this threat execute method to add custom message handler. I added ThreadAttach/ThreadDetach code (look start message in this topic) and freezes gone but I not sure that this code is safe. François Piette thinks this is the wrong code -
ICS & DelphiMVCFramework
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
Thank you, i saw the topic but is not my case. I can't create, run and free TSslHttpCli object in the same thread context for performance reasons and business flow. I have to create and free TSslHttpCli object within DelphiMVCFramework session and reuse it each time my endpoints are called. Each time my endpoint is called, new thread is created by DelphiMVCFramework engine with TTask.Run() and TSslHttpCli object is used in that thread context, each endpoint call - new thread, quite so DelphiMVCFramework works. I also can't use DelphiMVCframework's embedded HttpClient because it doesn't support TLS1.3 (( -
ICS & DelphiMVCFramework
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
have I use TSslHttpCli.PostAsync method ? separate thread is the TTask.Run() thread -
I think not all communications can be completed when the server stops. In this case these communications should be terminated and the service should be stopped without exceptions The last error is Runtime error 216
-
ICS & DelphiMVCFramework
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
Since the code of [using] section is already executed in a separate thread, I use the synchronous Get method and not GetAsync I expect that in the finally section work of Get method will be completed What do you think would be the correct solution? -
Hello I don't know, why finalization code from OverbyteIcsLIBEAY unit called earlier than TSslBaseComponent.FinalizeSsl and where are many exceptions occur in FinalizeSsl when my windows service stops ? What could be the reasons for this case? ICS 8.70, Delphi Tokyo
-
Hello I use TSslHttpCli in my backend built on DelphiMVCFramework for query external services. The TSslHttpCli object embedded into DelphiMVCFramework session and used each time then client called my endpoint. This call each time occurs in different thread. For certain reasons a can't create, use and free TSslHttpCli object each time in one thread context. I want to use thread context switching. Is this code safe? // initialization fClient: TSslHttpCli; ... fClient := TSslHttpCli.Create( nil ); fClient.MultiThreaded := True; // using if fClient.ThreadID = 0 then fClient.ThreadAttach; try fClent.Post(...); finally fClient.ThreadDetach; end;
-
ICS 8.67 & Delphi 2010
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
{$IFDEF COMPILER15_UP} maybe it would be more correct? -
unit OverbyteIcsMailQueue constructor TIcsMailQueue.Create(Aowner: TComponent); begin inherited; ... {$IFDEF UNICODE} FBodyText.WriteBOM := False; { V8.67 } {$ENDIF UNICODE} FMailServers := TMailServers.Create(Self); ... end; procedure TIcsMailQueue.SaveQuHdrs; ... {$IFDEF UNICODE} QueueLines.WriteBOM := False; { V8.67 } {$ENDIF UNICODE} ... [DCC Error] OverbyteIcsMailQueue.pas(1464): E2003 Undeclared identifier: 'WriteBOM' [DCC Error] OverbyteIcsMailQueue.pas(2243): E2003 Undeclared identifier: 'WriteBOM'
-
ICS 8.63 little patch
Mark Lobanov replied to Mark Lobanov's topic in ICS - Internet Component Suite
Why now fixed ? -
Hello, [OverbyteIcsWSocketS.pas] procedure TSslWSocketServer.OrderClose; OLD>> if FIcsHosts.Count = 0 then Exit; NEW>> if (not Assigned( FIcsHosts )) or (FIcsHosts.Count = 0) then Exit;