Session timeout in ASP.NET

后端 未结 15 2166
忘了有多久
忘了有多久 2020-11-22 09:14

I am running an ASP.NET 2.0 application in IIS 6.0. I want session timeout to be 60 minutes rather than the default 20 minutes. I have done the following

  1. Set <
相关标签:
15条回答
  • 2020-11-22 09:54

    After changing the session timeout value in IIS, Kindly restart the IIS. To achieve this go to command prompt. Type IISRESET and press enter.

    0 讨论(0)
  • 2020-11-22 09:56

    The Timeout property specifies the time-out period assigned to the Session object for the application, in minutes. If the user does not refresh or request a page within the time-out period, the session ends.

    IIS 6.0: The minimum allowed value is 1 minute and the maximum is 1440 minutes.

    Session.Timeout = 600;
    
    0 讨论(0)
  • 2020-11-22 09:57

    If you are using Authentication, I recommend adding the following in web.config file.

    In my case, users are redirected to the login page upon timing out:

    <authentication mode="Forms">
        <forms defaultUrl="Login.aspx" timeout="120"/>
    </authentication>
    
    0 讨论(0)
提交回复
热议问题