By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,795 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,795 IT Pros & Developers. It's quick & easy.

Session State ?

P: n/a
WJ
I am setting the Session State TimeOut to 54 minutes (20 is default) in the
Web.Config. I use SQL Server to persist the session states & ID. As long as
I am remaining in the web sites, I see all the data persisted from page to
page. However, once I quit the browser (MS/IE 6.1) and got backin within 2
seconds, the persisted data no long existed. My impression on the "timeout"
paramter is that as long as I come back to my site within the defined
timeout period (54 minutes), I should see my data from previous sessions
without re-entering them. At this point I am still running my web app. on my
XP/Sp1 Prof.. and SQL Developer edition. I inspected the ASPState DB and it
appears to capture the sessions properly. The time out is also recorded to
the database properly.

Thanks for your help,

John
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
WJ,
This issue requires an understanding about how ASP.NET session works.
First, ASP.NET will put a non-persistent cookie in the user's browser called
ASP.NET SessionID. Since that cookie is present with the Session ID on
every request, ASP.NET can match the browser with the correct session. When
you close the browser, and since it's a non-persistent cookie, the cookie is
automatically discarded, so you open another browser, and you don't have the
cookie. The session is still available on the server, but you don't have
the cookie to match you up with it, so ASP.NET issues you another
non-persistent cookie along with another session. To support multi-browser
sessions, you could add code to make the cookie persistent in your
Global.asax file on Session start.

Best regards,
Jeffrey Palermo
"WJ"<Jo*******@HotMail.Com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
I am setting the Session State TimeOut to 54 minutes (20 is default) in the Web.Config. I use SQL Server to persist the session states & ID. As long as I am remaining in the web sites, I see all the data persisted from page to
page. However, once I quit the browser (MS/IE 6.1) and got backin within 2
seconds, the persisted data no long existed. My impression on the "timeout" paramter is that as long as I come back to my site within the defined
timeout period (54 minutes), I should see my data from previous sessions
without re-entering them. At this point I am still running my web app. on my XP/Sp1 Prof.. and SQL Developer edition. I inspected the ASPState DB and it appears to capture the sessions properly. The time out is also recorded to
the database properly.

Thanks for your help,

John

Nov 18 '05 #2

P: n/a
Hi John,

This sounds like the expected behaviour: A Session ends if the user fails
request your site's page for 54 minutes OR they close the browser. Don't
forget that the session cookie is stored in memory in the browser so it
disappears when the browser closes.

Ken

"WJ" <Jo*******@HotMail.Com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
I am setting the Session State TimeOut to 54 minutes (20 is default) in the
Web.Config. I use SQL Server to persist the session states & ID. As long
as
I am remaining in the web sites, I see all the data persisted from page to
page. However, once I quit the browser (MS/IE 6.1) and got backin within 2
seconds, the persisted data no long existed. My impression on the
"timeout"
paramter is that as long as I come back to my site within the defined
timeout period (54 minutes), I should see my data from previous sessions
without re-entering them. At this point I am still running my web app. on
my
XP/Sp1 Prof.. and SQL Developer edition. I inspected the ASPState DB and
it
appears to capture the sessions properly. The time out is also recorded to
the database properly.

Thanks for your help,

John


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.