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
  • 159,224
  • 26
  • 237
  • 393
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
  • 20,296
  • 6
  • 68
  • 109