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

this thread must be moved to ASP.NET forum.

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.

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.

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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.