문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top