Link to home
Start Free TrialLog in
Avatar of arthurh88
arthurh88

asked on

ASP.NET how to extend session time?

user logs in.  inside their control panel, they write up a bio.  when they click "Submit", they are bounced back to the login screen because they are no longer "logged in"

I'm using this code at the top of the control panel pages:
If Session("Auth") = False Then
            Response.Redirect("login-page.aspx")
        End If
        Name = Session("Name")
        UserID = Session("UserID")
        Auth = Session("Auth")

So, what happens is, they are taking too long writing up their bio and are bouncing out.  How do I extend the session to 30 minutes, or even an hour?
Avatar of zgamer99
zgamer99
Flag of United States of America image

This a server-side setting. You can edit the web.config and adjust as shown below:
<system.web>
        <sessionState timeout="1800"/>

Otherwise you can go into IIS Manager configure it there as well.
ASKER CERTIFIED SOLUTION
Avatar of SAMIR BHOGAYTA
SAMIR BHOGAYTA
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial