Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
overriding session creation call
#1
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()->DoCommandGet().

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) <> -1) then
  begin
    SetNewSessionInfo(ASession, ASession.Data); //custom function to fill session info
  end;
end;
My breakpoint doesn't hit here on /$/Start call.
Reply


Messages In This Thread
overriding session creation call - by akanksha.tiwari - 06-09-2025, 06:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)