G
Guest
I just wanted to post this after looking in google and not finding anything
about it:
If you create an asp.net 2.0 project, you will find that it does not save
the session cookie unless you add a global.asax file to the project (in 2.0
there is not one by default).
More specifically, you must handle the Session_Start event in order for
sessions to be persisted. I checked this by creating a page with two
controls: a text box and a button. The Page_Load for the page has
"TextBox1.Text = Session.SessionID;" in it. You will notice a different
session id is generated each time you click the button. This behavior is not
expected. The SessionID should be the same for each postback.
The behavior stops if you add a Global.asax file to the project.
about it:
If you create an asp.net 2.0 project, you will find that it does not save
the session cookie unless you add a global.asax file to the project (in 2.0
there is not one by default).
More specifically, you must handle the Session_Start event in order for
sessions to be persisted. I checked this by creating a page with two
controls: a text box and a button. The Page_Load for the page has
"TextBox1.Text = Session.SessionID;" in it. You will notice a different
session id is generated each time you click the button. This behavior is not
expected. The SessionID should be the same for each postback.
The behavior stops if you add a Global.asax file to the project.