Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sessions in .net

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
What is the best way to do session? The way I am doing it now is that I have it being created in the default page, but Session.Timeout does not seem to be working - I am losing the session quick - should this be done in global.asax? Any help?

[conehead]
 
What are you trying to do with your session variable?
 
Use a cookie, there will never be a session time out. plus it is easier to interact with asp as well. Or you could cache the varibles, altough i am not sure if it will time out as well.

Code:
' i think it looks like this. 
cache("Key")= value
 
if your looking to adjust your session time, you can use your web config file.

 
My issues is this - I have a site where you have to login - I am putting that login info in a session and am checking it on each page - it is timing out rather quickly - I am doing this all on the default.aspx page - I just need to know the best way to do this? Thanks for any help....

[conehead]
 
adjust your session timeouts in your web config file. that sets the default time out and your app.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top