How do I make user authentication timeout last longer

Donald Symmons 2,996 Reputation points
2023-04-12T07:57:14.8866667+00:00

Hello forum, Please there is something I need to understand regarding authentication timeout in the Web Config. I am using Session with authentication. Each time I login in my local machine, within a short duration, I get logged out. At first, the timeout was “60”, I then increased it to “120”; the duration lasted more than the “60”. I thought having a timeout of “120” meant its 120 minutes ? I just want to get know how to make user stay longer, if it's other than this. Thanks Web Config

<system.web>
    <sessionState timeout="120">
    </sessionState>
    <authentication mode="Forms">
      <forms name="login" timeout="120" cookieless="UseCookies" loginUrl="Login.aspx" defaultUrl="Dashboard.aspx" slidingExpiration="true" />
    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>
    <compilation debug="true" targetFramework="4.7.2" />
    <httpRuntime targetFramework="4.7.2" maxRequestLength="3145728" />
    <customErrors mode="Off" />
    <pages enableEventValidation="false">
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
  </system.web>

Developer technologies | .NET | Other
Developer technologies | XAML
Developer technologies | XAML

A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.

Developer technologies | ASP.NET Core | Other

1 answer

Sort by: Newest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.