Prevent automatic logout?

In ASP.NET Forms authentication, can I prevent or extend the time that ASP.NET automatically logs me out? And also, what does this have to do with the state of the session, and also do I need to extend the session?

This is one of the properties I found on this.

Membership.UserIsOnlineTimeWindow

And further

<authentication mode="Forms">
  <forms loginUrl="login.aspx" timeout="15"/>
</authentication>

And yet, I think this might be the right way?

<system.web>
    <authentication mode="Forms">
          <forms timeout="50000000"/>
    </authentication>
</system.web>

I would like to get some explanation of how this is all connected. I also remember that I vaguely did something with the state of the session on such a problem before.

Here is a similar question with a partial answer, http://forums.asp.net/t/903256.aspx

Does Member.IsUserOnlineTimeWindow seem to be for database functions only and not for auth cookie?

+3
1

, . sessionState authentication forms.

Web.config

<system.web>
    <authentication mode="Forms">
        <forms timeout="60" />
    </authentication>
    <sessionState timeout="60" />
    <membership userIsOnlineTimeWindow="60">
    <roleManager cookieTimeout="60">
</system.web>

+4

Source: https://habr.com/ru/post/1773700/


All Articles