954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

need help with session values

Hi,

I am a bit confused with sessions, I have read somewhere that session values get destroyed after the session is expired ; to test that i created two web forms each generating session values on page load, also i capture browser session id by:

session.sessionid();

I am using mozilla firefox as browser

I see that when I click on a button i can see my session values in text boxes i provided

even after the session has expired

also the browser id should have changed too.....

but it remains the same

however when i close the browser with all its tabs

then the browser id changes.........

what should I conclude with the experiment?

1) what is the browser id anyway?

2) when are session values deleted anyway?

3) why did the browser showed my previous session values even after the session was expired?

please help

thanks

Shankbond

shankbond
Light Poster
31 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

this thread must be moved to ASP.NET forum.

serkan sendur
Postaholic
Banned
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127
 

How do say that you session was expired?

Did you set duration for session timeout?

The Session ID is randomly generated by ASP.NET and stored in a non-expiring session cookie in the browser. The Session ID value is then sent in a cookie with each request to the ASP.NET application.

The session will be expired based on the session timeout set in the server.

Ramesh S
Posting Pro
583 posts since Jun 2009
Reputation Points: 165
Solved Threads: 113
 
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Hi Ramesh
How do say that you session was expired?

Did you set duration for session timeout?

I have already set

Session.Timeout = 1; in session_start event in global .asax file already.

shankbond
Light Poster
31 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

i have not much information about session.sessionID...

but all i know is when u r request is sent at that moment...new session is created for your application..

after you refresh the page...you'll find different value of session id..

there is nothing to experiment..

if you are using session to store your textbox values...

then to kill session use...Session.Abandon() or session.clear()

it loses the value...hope it may work 4 u..

dnanetwork
Practically a Master Poster
Banned
633 posts since May 2008
Reputation Points: 28
Solved Threads: 106
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You