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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 97,915
» Latest member: luckyblockpolska
» Forum threads: 2,426
» Forum posts: 11,371

Full Statistics

Online Users
There are currently 1406 online users.
» 2 Member(s) | 1400 Guest(s)
Applebot, Bing, Google, Yandex, 789winsuk, luckyblockpolska

Latest Threads
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: MJS@mjs.us
09-11-2026, 09:49 PM
» Replies: 1
» Views: 169
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 137
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-08-2026, 01:48 AM
» Replies: 0
» Views: 154
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 453
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 230
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 626
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 217
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,218
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 349
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 973

 
  class function TIWExceptionRendererEx.RenderHTML
Posted by: Mikael Nilsson - 02-23-2023, 10:30 AM - Forum: IntraWeb General Discussion - Replies (1)

Hi,

I can't get this to work in production (isapi.ddl). It works perfectly in SA. Need support from Atozed

RAD Studio 11.2
IW 15.2.69


I



Attached Files
.txt   Server controller.txt (Size: 4.33 KB / Downloads: 6)
Print this item

  Issue when calling TerminateAndRedirect on an Amazon cloud server
Posted by: michel.foucrier@excilone.com - 02-22-2023, 01:35 PM - Forum: IntraWeb General Discussion - No Replies

Hi,

We are facing an issue when calling WebApplication.TerminateAndRedirect on an Amazon cloud server (Windows Server 2019, 64 bits). However, everything works fine on the development computers and the other Windows servers we tested so far.
 
The TerminateAndRedirect method is called from a button async click event. On the cloud server only, this triggers an "AJAX request failed: The application server did not respond." error. Enabling the ExceptionLogger did not help because no exception is raised. The IntraWeb session gets correctly terminated though.
 
We tested replacing the TerminateAndRedirect call by the following instructions, but this still triggers the same issue:
WebApplication.CallbackResponse.AddJavaScriptToExecuteAsCDATA('window.location.replace("' + WebApplication.AppUrlBase + '");');
WebApplication.Terminate;
 
However, replacing by the following instruction does the trick (terminating the session and redirecting to the main page) on all the servers we tested (including the cloud server):
WebApplication.CallbackResponse.AddJavaScriptToExecuteAsCDATA('window.location.replace("' + WebApplication.AppUrlBase + '$/start");');
 
For information, we are using:

  • IntraWeb 15.2.49
  • Delphi 10.4.2
  • SessionOptions.RequiresExplicitStart := False
  • SessionOptions.RestartExpiredSession := True
 
Is this issue already known or even fixed?

Thank you for your help.

Print this item

  Different Timeout for different Users
Posted by: Mikael Nilsson - 02-22-2023, 08:04 AM - Forum: IntraWeb General Discussion - No Replies

Hi,

How do I set different Timeout for different Users?

In my logon page I have tried WebApplication.SessionTimeout:=120; Is the correct?

Print this item

  php execution through IW standalone
Posted by: mhammady - 02-20-2023, 12:24 PM - Forum: IntraWeb General Discussion - Replies (2)

Hi,

Are we able to run a PHP script through IW standalone? if yes, is there a demo/example of how to do that?

Thank you

Print this item

  OnAsyncPageUnloaded don't wok
Posted by: Mikael Nilsson - 02-20-2023, 10:57 AM - Forum: IntraWeb General Discussion - Replies (3)

Hi,

I tried to use OnAsyncPageUnloaded. But if I add the example code I have to click twice on every button link etc on that page.

Print this item

  Catch Timeout
Posted by: Mikael Nilsson - 02-19-2023, 10:03 AM - Forum: IntraWeb General Discussion - Replies (5)

Hi,

Is it possible to catch when a user reach the timeout and redirect them to a specific page?


I don't mean to keep the session alive. I want to do something like WebApplication.TerminateAndRedirect('https://xxx.yyy.com/Default/TimedOut.Htm');

Print this item

  RegisterCallBack
Posted by: Xenogall - 02-17-2023, 02:37 PM - Forum: IntraWeb General Discussion - No Replies

I'm struggling to get my callback to work each time a page is loaded. It always works the first time I create the page, but the callback does not work if I make the page a second time.

In my HTML I have a script to call a function when the page loading has completed.

    <script defer>
        ajaxCall("pageLoadedEvent", "");
    </script>


In my application I register the callback in the form's OnCreate

WebApplication->RegisterCallBack("pageLoadedEvent", PageLoadedEvent);

The function PageLoadedEvent is called when the page has loaded. However, if I release this form and then create it again (e.g. return to login page and then login again), the callback does not work.

I've tried using the UnregisterCallback n the form's OnDestroy

WebApplication->UnregisterCallback(PageLoadedEvent);

but it doesn't seem to make any difference.

If I have the ServerController's RestartExpiredSession = true, the PageLoadedEvent can be called for a form that no longer exists, i.e. a previous form that has now been released. This crashes my application. 

If I have the ServerController's RestartExpiredSession = false, the PageLoadedEvent isn't called when I make the form for a second time. 

I'm using an old version of IW (15.0.17) as I can't upgrade until I can remove all the CGDevTools from my application.

If there's not way to fix this in the version of IW I am using, I'd be happy with a way of releasing the form, such that when I recreate it, I can register the callback to the new form.

Thanks,
Richard

Print this item

  Difference between Async and Sync events
Posted by: Lenfors - 02-15-2023, 11:36 AM - Forum: IntraWeb General Discussion - Replies (1)

Hello!

I really need to know what the difference is between asynch and synch events!

For instance, I created a new application with only a TIWTimer on the form. Then I created a OnTimerEvent doing nothing.
When run the OnTimerEvent is fired as it should.
Now I added a OnAsynchTimer event to the same IWTimer.
When run now the OnAsynchTimer is fired but not the OnTimerEvent?

Another example:
New empty application with only a event defined for OnResize doing nothing.
When starting the application or resizing the browser window OnResize  is called as expected.
Now creating a OnAsyncResize event. Both OnResize and OnAsyncResize  are called on form creation and browser form resize.

Now I added a IWTimer to the last example and added a OnTimer event to it.
The OnTimerEvent fires as expected but also the forms OnAsyncResize event?!
If I remove the OnTimer event and instead add a OnAsyncTimer the OnAsyncTimer is triggerd as expected but there is no OnAsyncResize triggered.

Is there some documentation about this? I Googled but can't find any good explanation.

Best regards, Mikael

Print this item

  TIWCustomControl's FPageContext field
Posted by: ebob42 - 02-14-2023, 12:25 PM - Forum: IntraWeb General Discussion - Replies (3)

I would like to suggest a possible change in the way IntraWeb custom controls decide to call the UnRegisterAsyncEvents method.

At this time, in IW 15.2.69, the Dispose method of TIWCustomControls only checks to see if IsDesignMode is true. I would like to add another condition to that:

  if Assigned(OwnerForm) and not (OwnerForm as TIWForm).PageContext.Destroying then

This will be faster, since the UnRegisterAsyncEvents will no longer have to do through all controls and all events to unregister them (which is not required, since we are in the Destroy of our main form anyway).

It is also a bit safer, since my code uses an approach with templates where numerous controls are added dynamically to the form, with a temporary PageContext. Since this PageContext often no longer exists when the page is destroyed, I sometimes get access violations (if the custom control's PageContext, which no longer exists, has a Destroying field pointing to some place in memory which just happend to be False).

I've been using the modified IWControl.pas for a while now, without any further problems.

Thanks for your consideration.

Groetjes, Bob Swart

Print this item

  IWAppFormAsyncResize fired without reason
Posted by: Lenfors - 02-14-2023, 10:10 AM - Forum: IntraWeb General Discussion - Replies (2)

Hello!

Discovered another strange ting in IntraWeb 15.2.69.

Try the following:

Create a new IW application and put a TIWTabControl on it.
Add a couple of pages to the TabControl.
Create an event for the forms OnAsynchResize.

When running the application the OnAsynchResize is fired once as it should and you can switch between the pages on the TabControl and no more OnAsynchResize is fired.

Now add an event to the TabControls OnChange event, it can be an empty event doing nothing.

Now when you run the program the OnAsynchResize event is fired on program startup as it should, but it's also fired every time you change page in the page control!

This is a big issue for me as I use the OnAsynchResize event for rescaling every component on the form.

Am i missing soething here? Is this normal behaviour?

Best regards, Mikael


object IWForm2: TIWForm2
  Left = 0

  Top = 0

  Width = 555

  Height = 400

  RenderInvisibleControls = True

  AllowPageAccess = True

  ConnectionMode = cmAny

  OnAsyncResize = IWAppFormAsyncResize

  Background.Fixed = False

  HandleTabs = False

  LeftToRight = True

  LockUntilLoaded = True

  LockOnSubmit = True

  ShowHint = True

  DesignLeft = 3

  DesignTop = 3

  object IWTabControl1: TIWTabControl

    Left = 96

    Top = 72

    Width = 305

    Height = 225

    RenderInvisibleControls = True

    OnChange = IWTabControl1Change

    ActiveTabFont.Color = clWebWHITE

    ActiveTabFont.FontFamily = 'Arial, Sans-Serif, Verdana'

    ActiveTabFont.Size = 10

    ActiveTabFont.Style = [fsBold]

    ActiveTabFont.PxSize = 13

    InactiveTabFont.Color = clWebBLACK

    InactiveTabFont.FontFamily = 'Arial, Sans-Serif, Verdana'

    InactiveTabFont.Size = 10

    InactiveTabFont.Style = []

    InactiveTabFont.PxSize = 13

    ActiveTabColor = clWebDARKGRAY

    InactiveTabColor = clWebLIGHTGRAY

    ActivePage = 0

    BorderOptions.NumericWidth = 0

    BorderOptions.Style = cbsNone

    Color = clWebSILVER

    ClipRegion = False

    TabPadding = 0

    ActiveTabBorder.Color = clWebBLACK

    ActiveTabBorder.Width = 0

    InactiveTabBorder.Color = clWebBLACK

    InactiveTabBorder.Width = 0

    DesignSize = (

      305

      225)

    object IWTabControl1Page0: TIWTabPage

      Left = 0

      Top = 20

      Width = 305

      Height = 205

      RenderInvisibleControls = True

      Title = 'Page0'

      BorderOptions.NumericWidth = 0

      BorderOptions.Style = cbsNone

      Color = clWebWHITE

    end

    object IWTabControl1Page1: TIWTabPage

      Left = 0

      Top = 20

      Width = 305

      Height = 205

      RenderInvisibleControls = True

      TabOrder = 1

      Title = 'Page1'

      BorderOptions.NumericWidth = 0

      BorderOptions.Style = cbsNone

      Color = clWebWHITE

    end

  end
end



unit Unit2;
interface

uses

  Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes,

  IWCompTabControl, Vcl.Controls, Vcl.Forms, IWVCLBaseContainer, IWContainer,

  IWHTMLContainer, IWHTML40Container, IWRegion;

type

  TIWForm2 = class(TIWAppForm)

    IWTabControl1: TIWTabControl;

    IWTabControl1Page0: TIWTabPage;

    IWTabControl1Page1: TIWTabPage;

    procedure IWAppFormAsyncResize(Sender: TObject; EventParams: TStringList);

    procedure IWTabControl1Change(Sender: TObject);

  public

  end;

implementation

{$R *.dfm}



procedure TIWForm2.IWAppFormAsyncResize(Sender: TObject; EventParams: TStringList);

begin

// Put breakpoint here if you want to see when it's fired

end;



// If this function is removed everything works fine!

procedure TIWForm2.IWTabControl1Change(Sender: TObject);   

begin

//

end;



initialization

  TIWForm2.SetAsMainForm;


end.

Print this item