Hi folks,
I am trying to override DoNewSession() event to write custom code on "/$/Start" call.
What I am facing is that when DoNewSession event is not getting called when "/$/Start" call is received on server instead the thread directly goes to AfterDispatch event from HttpExecute()-&tDoCommandGet().
I have tried to override rather redefine BaseNewSession, BaseOnConfig, BaseBeforeDispatch but nothing worked.
My redefined functions are calling for other API calls but for /$/Start.
Any leads would help.
Here's the sample code:
My breakpoint doesn't hit here on /$/Start call.
I am trying to override DoNewSession() event to write custom code on "/$/Start" call.
What I am facing is that when DoNewSession event is not getting called when "/$/Start" call is received on server instead the thread directly goes to AfterDispatch event from HttpExecute()-&tDoCommandGet().
I have tried to override rather redefine BaseNewSession, BaseOnConfig, BaseBeforeDispatch but nothing worked.
My redefined functions are calling for other API calls but for /$/Start.
Any leads would help.
Here's the sample code:
Code:
procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication);
var
lRequest: THttpRequest;
lSession: TIWUserSession;
lPath: String;
begin
//TODO only create this when new user is logging on
ASession.Data := TIWUserSession.Create(nil, ASession);
lPath := ASession.Request.PathInfo;
if (lPath = '/$/start') or
(ServerGlobals.SessionPaths.IndexOf(lPath) &t&t -1) then
begin
SetNewSessionInfo(ASession, ASession.Data); //custom function to fill session info
end;
end;