Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 84,183
» Latest member: basketbountyslot1
» Forum threads: 2,412
» Forum posts: 11,326

Full Statistics

Online Users
There are currently 485 online users.
» 4 Member(s) | 478 Guest(s)
Applebot, Bing, Google, 88vbetjpnet, bong88comtw, hoangphongnguyen, tk88ipcom

Latest Threads
OpenSSL and concurrent re...
Forum: Indy
Last Post: kbriggs
Yesterday, 02:41 PM
» Replies: 5
» Views: 91
Projeto Intraweb
Forum: IntraWeb General Discussion
Last Post: vonirpereira
07-03-2026, 06:51 PM
» Replies: 0
» Views: 56
Intraweb + Lazarus
Forum: IntraWeb Dúvidas Gerais
Last Post: vonirpereira
07-03-2026, 06:35 PM
» Replies: 0
» Views: 26
Image question on tiwjqdb...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
07-01-2026, 12:19 AM
» Replies: 4
» Views: 4,249
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
07-01-2026, 12:04 AM
» Replies: 4
» Views: 612
CSS file not reloading af...
Forum: IntraWeb General Discussion
Last Post: Gustave
06-30-2026, 09:00 PM
» Replies: 0
» Views: 79
IW 16.2.0 Missing librari...
Forum: IntraWeb General Discussion
Last Post: Gregory_Twedt
06-24-2026, 04:40 AM
» Replies: 5
» Views: 776
VCL conversion
Forum: Delphi General Discussion
Last Post: tobenschain
06-20-2026, 05:00 AM
» Replies: 0
» Views: 141
TIWjQDBGrid changing UI
Forum: IntraWeb General Discussion
Last Post: BoostedCruiser
06-08-2026, 02:02 AM
» Replies: 36
» Views: 70,875
Access Violation When Val...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
06-03-2026, 08:47 AM
» Replies: 2
» Views: 575

 
  on resize for regions?
Posted by: pete@pdmagic.com - 07-07-2019, 09:40 PM - Forum: IntraWeb General Discussion - Replies (2)

Standard HTML+JS only provides resize events for windows and frames. However Intraweb also resizes controls using the align functionality.  (e.g. when a splitter is used)

There are a couple of places where I've embedded content that needs to be notified of resize so they can redraw themselves. I've got the following code in one such place:

Code:
window.resize(function(){
          CurDgm.PanZoom.resize();
          CurDgm.PanZoom.fit();
          CurDgm.PanZoom.center();
    });


That code works as expected when the browser is resized.  However, when a splitter is used that causes the containing region to change size, that function will not be called.

Is there an IW event handler I can hook to to call this code when a region changes size?


Thanks!

Print this item

  debug isapi application
Posted by: ronaldobim - 07-06-2019, 07:52 PM - Forum: IntraWeb Dúvidas Gerais - Replies (1)

Alguém que usa isapi e consegue debugar a aplicação no iis ?

Print this item

  IWListbox on mobile browser as Listbox?
Posted by: wieczy - 07-06-2019, 07:24 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi,

IWListboxes on mobile Browsers rendered as "selectboxes" (ig. on iPad or iPhone). Is it possible to suppress this behavior so that the IWListboxes  appear as really Listboxes?

Any hints are welcome.

Greetings

wieczy.

Print this item

  Play IP camera stream in Intraweb.
Posted by: thiagorod - 06-30-2019, 06:19 AM - Forum: IntraWeb General Discussion - Replies (6)

Hello,

Is it possible to open IP cameras streams using a standard Intraweb component? If affirmative, which one? I would like to have it playing in a defined box on the form, and to just launching media player. 

Regards,

Print this item

  IWGRID Align
Posted by: htws07 - 06-29-2019, 05:04 PM - Forum: IntraWeb General Discussion - No Replies

Why iwgrid can't  align with page when user resize web page, but iwdbgrid can?

delphi 10.2 update 3, iw 15.0.10.

Print this item

  Custom control inherited from IWControls
Posted by: LeoBruno - 06-29-2019, 12:39 AM - Forum: IntraWeb General Discussion - Replies (2)

Hi:

I´m developing some IWControls inherited from TIWEdit.

I would like to ask for help, since I´m having a few problems with the inherited controls in design time.

I must say that I´m using IW 14 bundled version (delphi 10.3), so no access to the source code avaiable.

1# - Inherited controls doesn´t look like their parents in design time. (see picture attached). (solved, see the post bellow)
2# - Not possible to assign ScriptAvents through a method called by other property setter.

There is a boolean property, and based on it´s value a method gets some javascripts in order to be set at scriptevents.
The boolean property setter, after defining the property value, calls the method to add the script events.
The method is being called properly, but before adding the new scripts, is necessery to delete the old ones.
If the old scriptevents are not deleted, the new one is not added.

So, the SetJavaScripts method, looks like this:


procedure TLBIWXEditFloat.SetJavaScripts(aAllowNegative: boolean);
var
  _Idx: Integer;
  _OnKeyDown: TStringList;
begin
  _Idx := Self.ScriptEvents.IndexOf('onKeyDown');

  if _Idx > 0 then
    Self.ScriptEvents.Delete(_Idx);

_OnKeyDown := TLBXIntraWebJs.GetScrptEdtFloatOnKeyDown(aAllowNegative);
  try
    Self.ScriptEvents.Add('onKeyDown', _OnKeyDown.Text);
  finally
    _OnKeyDown.Free;
  end;
end;

The problem is that in design time, "Self.ScriptEvents.IndexOf('onKeyDown')" always returns -1, therefore is impossible to delete the scriptevent, preventing to add the new one.

AllowNegative setter looks like this:

procedure TLBIWXEditFloat.SetAllowNegative(const Value: Boolean);

begin

  FAllowNegative := Value;

  Self.SetJavaScripts(Value);
end;

What am I missing?

Thanx in advance!

Print this item

  TidHTTPServer and Orphaned Connection Threads
Posted by: takyon_dg - 06-27-2019, 08:02 PM - Forum: Indy - Replies (8)

So I've got an HTTP Service and after about 25,000-35,000 connections in a live environment, I start to get "EOutofMemory" errors and eventually the OnListenException event starts getting triggered with "Thread creation error: Not enough storage is available to process this command". 

Eventually the service just can't accept any new connections and we get other evidence if resource limitation issues in the main service thread and anything that attempts to write to the disk. 

Now there are plenty of EIdOSSLAcceptError and EIdSocketError (usually 10054, 10053 or 10060) triggered in the generic HTTP Exception handler. I've recently updated from 1.0.1t to 1.0.2s on the openssl side to see if it mitigates some of these ssl protocol errors. Anyhow, trapped inside my OnCommandGet Handler, the most common exception (Socket Error #10054. Connection reset by peer.) is around a GET request that serves up an image via SmartServeFile. But it's not specific to any one image and it's intermittent and not something I've been able to trigger in the development environment, we figure the client just drops connection before SmartServe can complete and this is what it looks like when it happens. Most of the 'heavy lifting' for the service happens in a POST process.

Now I've tried creating some exceptions in my OnCommandGet handler (sending bad data) to see if I'm cleaning up in my try/finally and exceptions and it all looks good. Eurekalog doesn't report any leaked memory and my thread count stays stable. 

In the live environment, I see the service is steadily growing in thread count. Seems to die somewhere around 1500 threads after about 6-10hrs depending on traffic, however plenty of hardware resources left (RAM and SSD). A simple restart of the service works just fine. So this implies there's a bunch of orphaned threads. Looking at process monitor, I can see hundreds of threads what would likely have started as CommandGet connection threads, still existing from HOURS ago. CPU utilization is very low, and the application handling these thousands of connections doesn't use up much cycles... so it doesn't appear these threads are stuck in any kind of loop. The Stack for all of these 'old' threads just shows:

ntoskrnl.exe!KeSynchronizeExecution+0x5bd6
ntoskrnl.exe!KeWaitForMultipleObjects+0x109d
ntoskrnl.exe!KeWaitForMultipleObjects+0xb3f
ntoskrnl.exe!KeWaitForMutexObject+0x377
ntoskrnl.exe!KeQuerySystemTimePrecise+0x881
ntoskrnl.exe!ObDereferenceObjectDeferDelete+0x28a
ntoskrnl.exe!KeWaitForMultipleObjects+0x1284
ntoskrnl.exe!KeWaitForMultipleObjects+0xb3f
ntoskrnl.exe!KeWaitForMutexObject+0x377
ntoskrnl.exe!NtWaitForSingleObject+0xf8
ntoskrnl.exe!_setjmpex+0x68a3
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x540
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x3a5
wow64.dll!Wow64KiUserCallbackDispatcher+0x4151
wow64.dll!Wow64LdrpInitialize+0x120
ntdll.dll!LdrInitializeThunk+0x16d
ntdll.dll!LdrInitializeThunk+0xe

None of which is my windows service (obviously), but it suggests the thread(s) are still alive.

I'm wondering how I can dig deeper into these seemingly orphaned threads to figure out how they got orphaned. Even with the EIdOSSLAcceptError and EIdSocketError's the number of those that occur, do not accumulate to the number of threads. And yes, I'm re-raising EIdExceptions in my handlers. 

Any ideas would be appreciated. 

Indy version is 10.6.1.5182 on XE7. 

Basic service structure is in the OnCommandGet is...

Code:
procedure TsvcThing.srvHTTPCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
  XMLDoc: IXMLDocument;
  adoConn: TADOConnection;
  adoQuery, adoQueryOther: TADOQuery;
begin
  try
    CoInitialize(nil);
    try
      if ARequestInfo.Command = 'GET' then
        //serve up the requested file
        AResponseInfo.SmartServeFile(AContext, ARequestInfo, Path + filename);

      if ARequestInfo.Command = 'POST' then
      begin
        adoConn := TADOConnection.Create(nil);
        adoQuery := TADOQuery.Create(nil);
        adoQueryOther := TADOQuery.Create(nil);

        try
          adoConn.ConnectionString := 'valid connection string';
          adoQuery.Connection := adoConn;
          adoQueryOther.Connection := adoConn;

          if not adoConn.Connected then
            adoConn.Connected := true;

          XMLDoc := LoadXMLData(ReadStringFromStream(ARequestInfo.PostStream, -1));
          try
            //perform various queries (Open and ExecSQL) based on XML request

            //set fields in XML response

            if error_processing_xml_or_data then
              AResponseInfo.ResponseNo := 400
            else
            begin
              AResponseInfo.ContentType := 'application/xml';
              AResponseInfo.ResponseNo := 200;
              AResposneInfo.ContentText := XMLDoc.XML.Text;
            end;
          finally
            XMLDoc.Active := False;
          end;
        finally
          FreeAndNil(adoQueryOther);
          FreeAndNil(adoQuery);
          FreeAndNil(adoConn);
        end;    
      end;
    finally
      CoUnintialize;
    end;
   except
     on E: Exception do
       if Log then
          WriteLog(E.Message);
     on EIdException do raise;
   end;
end;

Print this item

  Indy SSL
Posted by: MusicBuddha - 06-27-2019, 03:46 AM - Forum: Indy - Replies (4)

Ti there,

I am just wondering if Indy Supports SSL? If so could someone possible post an example in C++?

Thanks,

MusicBuddha

Print this item

  TIdConnectionIntercept TCP Header Encrypting
Posted by: whitekn3 - 06-24-2019, 11:01 PM - Forum: Indy - Replies (2)

I am working on a C++ project that was using Indy 9 and now uses Indy 10 to talk to device controllers that use a proprietary encryption method. 

In Indy 9 a TMemoryStream object was used that included the TCP Packet header and we could read and set the TCP headers bytes directly.   Indy 10 uses a TIdBytes instead of TMemoryStream and I cannot figure out any way to manipulate the TCP Packet header bytes to get the same results.

Is there a component I should be looking at?  Documentation or a post somewhere that might help me?

Print this item

  custom html page if file not found
Posted by: MrSpock - 06-22-2019, 06:52 AM - Forum: IntraWeb General Discussion - Replies (8)

intraweb 14

If a user tries to open file my-domain/file.htm they get the standard intraweb message 404. I have had no luck changing it with my custom html page.

Print this item