[2008] asp.net session
am 22.04.2008 15:14:01 von Doken13When I close my browser (IE7) I see that the session in IIS is not closed.
Is there any way (by typing code in my project) to close the session when I
close the browser ?
When I close my browser (IE7) I see that the session in IIS is not closed.
Is there any way (by typing code in my project) to close the session when I
close the browser ?
nope (in a reliable way).
It will expire automatically after 20 minutes (configurable) of inactivity.
George.
"Doken13"
news:OaH1nsHpIHA.4280@TK2MSFTNGP02.phx.gbl...
> When I close my browser (IE7) I see that the session in IIS is not closed.
> Is there any way (by typing code in my project) to close the session when
> I close the browser ?
>
Because http is a stateless protocol, that means the browser is completely
disconnected from the web server the instant it completes pulling the last
resource (image, stylesheet, etc.) for that particular page. The web server
has no notification of anything else the user does unless they make another
request to the server. That's also why actions like closing the browser
won't affect the session since the web server has finished talking to the
browser and is just waiting to see if the browser contacts the server again
before it times out.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
"Doken13"
news:OaH1nsHpIHA.4280@TK2MSFTNGP02.phx.gbl...
> When I close my browser (IE7) I see that the session in IIS is not closed.
> Is there any way (by typing code in my project) to close the session when
> I close the browser ?
>