Pregunta

In my website I want to know when a client is logged out. In order to do so the client will be constantly sending a request to the website saying "hey I am logged in". The moment a client stops sending that request the website will assume that the client has been disconnected and will save those changes in the database.

So my question is if a client just send a request to the website could IIS reset session variables in the next minute?. Maybe IIS will not reset session variables n minutes after receiving a request? Should I create a windows service instead to be 100% sure?

¿Fue útil?

Solución

IIS resets session variables only when the session ends.

Maybe IIS will not reset session variables n minutes after receiving a request?

The session ends when the timeout occurs, so your n is the timeout defined for your session.

Should I create a windows service instead to be 100% sure?

I think you can do it without a windows service.

This article can help you http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstatemodule.end(v=vs.100).aspx

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top