I’m looking for a way to close all browser connections for a user.
So if a user clicks on a “Finish” or “Cancel” button on the webapp the browser closes all its sessions and realease its ressources on the server.
(Of course it should not shut down the server or other user sessions)
I’ve tried the following:
'app.AutoQuit = true
Session.Quit
This closes the browser’s connection… but I have found that it also influences other browers that are connected to the server (browsers become unresponsive)
Then I’ve tried this:
My app has 4 pages, I’ve found that if I close each page then it works.
But the problem here is that I don’t know how many pages are open before I try to close them:
I have all the code in the dismissed event of a modal dialog (that I use for a "Yes\o"dialog):
Here is what I do:
If user presses the button “cancel” then a dialog is shown “do you want to cancel ? Yes/No”.
If the user selects “yes” then I want to close the browser session (in the dismissed event)
[quote=127438:@Greg O’Lone]If the quit is not in the session itself, you MUST call Session.Quit , otherwise you get the global Quit and the app will quit.
But, if the user has multiple browser windows connected to your app, they all have separate sessions. You’ll need to keep track of that with a cookie.[/quote]
Greg, sorry to ask, but I need your advice. A while ago, you wrote that it was not recommended to use Session.Quit because of a bug. But this post seems to imply it is OK.
I still have an issue with sessions that won’t quit by themselves, so I think of forcing them to quit after a while with a timer and Session.Quit. Will it work ?