Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PRevenitng a session from being created in OnBeforeDIspatch
#3
Hi Sam,

For others in the future, I'm going to repost some of those responses.  Telegram doesn't "thread" by subject, and search isn't as useful so things like this are much more helpful to note here in the forum.  If I missed part of the conversation, or quoted it incorrectly, please post a response.
Thanks,
Dan

Chad:
Depending on your context, ContentHandlers may be what you are looking for. There are examples in our demos and they are documented on our site.
https://doc.atozed.com/en/iw15/develop/c...-handlers/
17 hooks onto 15 using ContentHandlers

Sam
I'm trying to avoid doing it with redirecting though - I want the URL to be the same as default, with a different html response.
This is the funcitonality that we had with XI, that I'm trying to recreate

Chad
If its on the first page, look at the onnewsession event in SC, it allows you to choose which page is returned for main

Alex:
OnBeforeDispatch does happen multiple times. Each request/response goes through OnBeforeDispatch. During application start up multiple requests are sent to the server. There is nothing wrong there
If you want to block a request before it creates a new session IW 15 gives you the OnBeforeNewSession event
TOnBeforeNewSessionEvent = procedure(const aUrlPath: string; aRequest: THttpRequest; out vCanCreate: Boolean) of object;
Just set vCanCreate to false and the user will get a 404 and no session will be created
Reply


Messages In This Thread
RE: PRevenitng a session from being created in OnBeforeDIspatch - by DanBarclay - 10-18-2019, 06:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)