I am building a web app that is limited to one database, therefore I cannot use the ASP.NET config tool. As a quick means of getting this app online, I tried to use a simple session variable. The login page verifies the user's credentials, and if they pass, it sets the session variable to a certain value. All other pages check in the page_load event whether or not the session variable is equal to that value. The problem is that once being logged in for a short while and sending and recieving some data, the session variable resets, and I'm returned to the login page to repeat the process. Here's the basic code from my webforms:
If UserName=... And Password=... Then
Session("Status") = "Logged In"
ErrorLabel.Visible = True
If Session("Status") = "Logged In" Then
Is there some setting I need to change in the web.config file to adjust the cookie timeout or is that only for the config tool authentication methods?
Thanks. Any reply leading to answer will be 'Marked as Answer'.
View Complete Post