[2008] asp.net session

[2008] asp.net session

am 22.04.2008 15:14:01 von Doken13

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 ?

Re: [2008] asp.net session

am 22.04.2008 15:33:02 von George Ter-Saakov

nope (in a reliable way).
It will expire automatically after 20 minutes (configurable) of inactivity.


George.


"Doken13" wrote in message
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 ?
>

Re: [2008] asp.net session

am 23.04.2008 16:41:55 von Mark Fitzpatrick

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" wrote in message
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 ?
>