Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

question about Sessionsate

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Britt - 18 Aug 2007 20:26 GMT
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
Juan T. Llibre - 18 Aug 2007 21:19 GMT
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 español : http://asp.net.do/foros/
======================================
> Hi,
>
[quoted text clipped - 6 lines]
> Thanks
> Britt

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.