Kill session / force sign out

M

Mohammad Samara

Hello everyone,

Is it possible to kill the Application session on website leave event? i.e
using "FormsAuthentication.SignOut()" when changing the web site by entering
a different domain name in the address bar on Internet explorer.

Thanks.
 
M

Mark Fitzpatrick

No. The reason is, the server never knows when a user leaves. The connection
to the server is disconnected the moment the last item in a page is
downloaded (in the case of http 1.1 that is, in http 1.0 a seperate
connection is opened/closed for the page as well as each and every item in
the page). There is no constant connection so the server can't know where
the client browser is going to if it isn't hitting pages on the server. The
cookie that is used for the forms authentication will expire anyways though
either when the timeout is reached.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP- FrontPage
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top