Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 348 online users. » 2 Member(s) | 343 Guest(s) Bing, Google, Yandex, Stevenvax, ThomasBism
|
Latest Threads |
iw15.5.10 does not addres...
Forum: IntraWeb General Discussion
Last Post: valmeras
Yesterday, 11:07 PM
» Replies: 2
» Views: 169
|
Cookies with the SameSite...
Forum: IntraWeb General Discussion
Last Post: valmeras
03-27-2024, 06:59 PM
» Replies: 0
» Views: 55
|
303 Redirect and Response...
Forum: IntraWeb General Discussion
Last Post: ALW2019
03-26-2024, 02:30 PM
» Replies: 0
» Views: 92
|
smmFunctions.pas
Forum: IntraWeb General Discussion
Last Post: Mikael Nilsson
03-26-2024, 10:33 AM
» Replies: 0
» Views: 100
|
TIWjQDBGrid paging
Forum: IntraWeb General Discussion
Last Post: troberts
03-26-2024, 04:06 AM
» Replies: 0
» Views: 102
|
Problem with cache and 40...
Forum: IntraWeb General Discussion
Last Post: troberts
03-25-2024, 01:54 AM
» Replies: 0
» Views: 110
|
IWModalWindow from differ...
Forum: IntraWeb General Discussion
Last Post: bjoernb
03-24-2024, 10:52 PM
» Replies: 0
» Views: 134
|
jQGrid css and js files
Forum: IntraWeb General Discussion
Last Post: medzoom
03-22-2024, 07:06 PM
» Replies: 2
» Views: 2,526
|
iwSelect list update in a...
Forum: IntraWeb General Discussion
Last Post: joelcc
03-20-2024, 08:07 PM
» Replies: 0
» Views: 143
|
IntraWeb Certificate Mana...
Forum: IntraWeb General Discussion
Last Post: DavidChiq
03-19-2024, 06:27 PM
» Replies: 1
» Views: 2,086
|
|
|
Please support THandlers.Delete method in unit IW.Content.Handlers.pas |
Posted by: ccy - 03-13-2024, 10:14 AM - Forum: IntraWeb General Discussion
- No Replies
|
|
In unit IW.Content.Handlers.pas, THandlers.Add method is available but there is no Delete method to remove TContentBase handler.
It is useful for application deployed with dynamic packages so we can write something like this:
Code: initialization
THandlers.Add('/register/', '', TContent_Register.Create);
finalization
THandlers.Delete('/register/', '');
end.
A patch for reference:
Code: unit IW.Content.Handlers.Patch;
interface
uses
IW.Content.Handlers;
type
THandlersHelper = class helper for THandlers
class procedure Delete(const aPath, aDocument: string);
end;
implementation
uses
System.SysUtils,
IW.Common.Strings, IWServerControllerBase;
class procedure THandlersHelper.Delete(const aPath, aDocument: string);
var i: Integer;
xPath: string;
begin
TIWServerControllerBase.CheckLockGlobal('Handlers.Delete');
if (aPath = '') and (aDocument = '') then begin
raise Exception.Create('Path and Document cannot both be empty.');
end;
// xPath
// -Path + Document: /mypath/mydoc.html
// -Path + Extension: /mypath/*.zat
// -Path: /mypath/
// -Document: mydoc.html
// -Extension: *.zat
if aPath = '' then begin
xPath := aDocument;
end else begin
if not IWStartsText('/', aPath) then begin
raise Exception.Create('Path must start with /');
end else
if (Length(aPath) > 1) and not IWEndsText('/', aPath) then begin // if aPath = '/', StrUtils.EndsText() returns false for EndsText('/', aPath)!!!
raise Exception.Create('Path must end with /');
end;
xPath := aPath + aDocument;
end;
if mList.Find(xPath, i) then
mList.Delete(i);
end;
end.
|
|
|
Closing a TCP/IP component connection the right way |
Posted by: Ahmed Sayed - 03-12-2024, 04:08 PM - Forum: Indy General Discussion
- Replies (3)
|
|
Hi,
Let's say that, I have a TCP component with its connection opened with the server, whether it is TIdTCPClient, TIdHTTP, TIdFTP, etc. What is the correct way to close the connection without raising any exception especially if the server went down before doing so?
I know that all of these classes inherit from TIdTCPClientCustom so there must be a common way to close them on that class level.
The idea here is that I want to create something similar to std::unique_lock, std::unique_ptr, and std::lock_guard. Let's call it unique_connection<T> for instance. So, regardless of the template T which can be any class that inherits from TIdTCPClientCustom, whenever unique_connection goes out of scope it will close the connection without raising any exceptions whether the server is still running or not.
I need this to make sure that there are no resources like sockets, or connections that are still open before the client gets destroyed.
|
|
|
session timeout thread |
Posted by: ebob42 - 03-12-2024, 11:46 AM - Forum: IntraWeb General Discussion
- No Replies
|
|
IntraWeb 15.5.x has made a significant positive change by introducing the TSentinelThread in the ServerController, to watch the internal workings of the session timeout thread activity, and the sentinel thread will restart it when needed. Although there is no way to know for sure (there is no message or output that the TSentinalThread has actually restarted the session timeout thread), we have not encountered situations where sessions were no longer destroyed.
Except... for a relative new situation, where one thread is using 25% CPU (we have 4 -core servers), and it looks like this may be the session timeout thread, since new session can still be created, but older sessions are no longer destroyed. And after a few hours, this leads to hundreds of extra sessions and memory overhead.
Could it be that the session timeout thread is locking some resource, and waiting for another reasons to become available? In other words, could this be a deadlock situation?
The next time this happens, I will attempt to kill the thread that takes 25% CPU. If this is indeed the session timeout thread, then hopefully the sentinel thread will restart it (although this will leave the locked resources probably still locked, so there's a big chance we'll end up in the same deadlock situation again.
If you have anything that could help us pinpoint or resolve this problem, we would be very grateful. Thanks.
Groetjes, Bob Swart
|
|
|
IntraWeb 15.5.8 TIWRegion Showing as white |
Posted by: CharCoil - 03-09-2024, 07:26 PM - Forum: IntraWeb General Discussion
- No Replies
|
|
IntraWeb 15.5.8 TIWRegion Showing as white even when set to other color. This issue only effecting design as the color does take effect for actual application but the designer always showing the background as white. I just upgrade from 1.5.3.1 to 15.5.8 and ran into this issue. This issue even applies with creating a new project and placing IWRegion on the form and changing color.
I try this in Delphi 11.3 but also test it in Delphi EX2 and the same thing.
|
|
|
Multipage websocket communication |
Posted by: davidbaxter - 03-08-2024, 09:31 PM - Forum: IntraWeb General Discussion
- Replies (1)
|
|
I've a Delphi 12 VCL app that I'm using Intraweb and sgcWebsockets to develop a web page based remote control for. Use a browser to control the app as you would as if you were at the computer sort of thing. To make the web pages nice for iPhones and such, it requires 2 pages. I put a websocket server in the VCL app and a client on the first page of the Intraweb app. Works great. Buttons work, data flows back and forth. The problem comes when the web app is switched to the second page. The client on the first page disconnects. Adding a second client to the second page doesn't connect either. Tried adding a second server with diffferent port numbers on the VCL without success. I'm using the two page design outlined in the Intraweb 15 example "MultiPageAPP". How can I get both pages to 'talk'?
|
|
|
what's triggered on page resize, using TemplateProcessor? |
Posted by: iwuser - 02-27-2024, 11:20 PM - Forum: IntraWeb General Discussion
- Replies (3)
|
|
I'm using Templates, the page is responsive, but I have a control that is not. So, I have placed it on a Region, and so my region is now responsive and I was hoping to either have that control auto-resize with AlignClient, which it does not, or set that control's width to Region's width in some event - but now for the life of me, I cannot find any event that is triggered around that time that I can use.
Form events do not matter with Templates. Region's OnRender still has the original design sizes, so it's of no use. OnAlignPosition is never triggered.
Has anyone done that before?
|
|
|
Bootstrap 5 integration |
Posted by: Ronald Krause - 02-27-2024, 11:16 AM - Forum: IntraWeb General Discussion
- Replies (4)
|
|
We have a nice app in IW15 with Boostrap 4.6.2 running.
Now we are asked, for security reasons, to upgrade to the latest Bootstrap version (currently 5.5.3).
I cannot discuss if this makes sense, its a public institution, its in thier standards.
Is there any support for Bootstrap5 planned, in sight? Does anybody know if BS5 is compatible? Can I just replace the JS-files and continue with the BS4 Delphi components?
Any help appreciated.
|
|
|
|