question about Sessionsate
Hi,
I read that SessionState is on by default.
I also read that if it's not required, it must be better off (because of
resources)
My question is: i don't use session variables (like e.g.
Session("mysessionvar")). Is that the only way to use session state, or
there are other ways?
Thanks
Britt
Date:Sat, 18 Aug 2007 21:26:00 +0200
Author:
|
Re: question about Sessionsate
re:
!> My question is: i don't use session variables (like e.g. Session("mysessionvar")).
!> Is that the only way to use session state, or there are other ways?
The purpose of keeping track of session state is to enable the use of session variables.
If you don't need to set session variables, you can save resources by disabling it.
The problem is that, if you do that, a new Session.SessionID will be created
every time a single page is refreshed in one browser session.
To avoid that, use url munging, by setting "cookieless" to "true" in web.config.
<sessionState mode="Off" cookieless="true" timeout="20" />
If you don't need to track someone's session by using Session.SessionID,
though, you can disregard setting "cookieless" to "true" in web.config.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================
"Britt" wrote in message news:%23FOcc2c4HHA.3916@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I read that SessionState is on by default.
> I also read that if it's not required, it must be better off (because of resources)
>
> My question is: i don't use session variables (like e.g. Session("mysessionvar")). Is that the only way to use session
> state, or there are other ways?
>
> Thanks
> Britt
>
Date:Sat, 18 Aug 2007 16:19:18 -0400
Author:
|