Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SQLServer session statemanagement: Round trips on every access?

Reply
Thread Tools

SQLServer session statemanagement: Round trips on every access?

 
 
Yash
Guest
Posts: n/a
 
      10-25-2007
Hi,

I have a very basic question regarding session state management in SQL
Server.

In a SINGLE page request, if multiple session variables are accessed,
will there be multiple roundtrips to the ASPState DB to retrieve the
values of the variables?

E.g.
void func(){
a = Session["AVAL"] ;
b = Session["BVAL"] ;
}
Will this cause 2 round-trips?

I would assume that the session data is retrieved just once on first
access during the page lifecycle. Please confirm my understanding.

Thanks,
Yash

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      10-25-2007
For out-of-proc session state every page loads the session during page
initialization and flushes it after the page has finished rendering. You can
control this behavior with the EnableSessionState attribute of the Page
directive. Depending on how the page needs to use session, you can either
disable it or enable for reading and writing or enable it for reading only.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Yash" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
>
> I have a very basic question regarding session state management in SQL
> Server.
>
> In a SINGLE page request, if multiple session variables are accessed,
> will there be multiple roundtrips to the ASPState DB to retrieve the
> values of the variables?
>
> E.g.
> void func(){
> a = Session["AVAL"] ;
> b = Session["BVAL"] ;
> }
> Will this cause 2 round-trips?
>
> I would assume that the session data is retrieved just once on first
> access during the page lifecycle. Please confirm my understanding.
>
> Thanks,
> Yash
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading ASP w/SQLserver 2000 to ASP.NET w/ SQLserver 2005 =?Utf-8?B?SmVmZnJleQ==?= ASP .Net 2 04-27-2007 03:33 PM
New to ASP.NET - A very basic question regarding the ViewState and Server Round Trips msnews.microsoft.com ASP .Net 5 04-23-2005 02:16 AM
Multiple Round Trips JJ ASP .Net Datagrid Control 1 12-16-2004 09:39 PM
ListBox and round-trips Mike ASP .Net Web Controls 1 05-05-2004 02:30 AM
ListBox and round-trips Mike ASP .Net 2 05-04-2004 09:33 AM



Advertisments