0

I am doing an asp.net project. In this i blocked user log in, meant's if a user logged in one system or browser he can't log in in other browser or system.

Now the problem is i want to free resources if the user directly closing the browser of shutdown the system.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
bageesh
  • 83
  • 1
  • 2
  • 9

1 Answers1

0

Your description is somewhat vague on 'how you block the user'. Nevertheless: Http is a stateless protocoll and you are not able to tell if a browser window is open or not.

You can manipulate this behaviour be setting the session timeout lower. You can set a session cookie, which expires at the end of the session.

Alternativly there is a javascript snippet here, that imitates this behaviour. Scroll down a little bit to get the snippet.

Community
  • 1
  • 1
Marco
  • 22,856
  • 9
  • 75
  • 124