How to stop session timeout after 20 minutes in asp.net?

I am using iis6 to deploy my application. No matter how I change the timeout in the iis configuration or add the global.asax file to set Session.Timeout or even use sessionstate, I still get the session timeout after 20 minutes, this is crazy! anyone please help me? I'm so stuck ..

web.config:

 <authentication mode="Forms">
          <forms name="__authcookie" loginUrl="LoginPage.aspx" timeout="60" protection="All" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/>
      </authentication>
      <sessionState mode="InProc" timeout="60" customProvider="AppFabricCacheSessionStoreProvider"></sessionState>
    <membership>
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>
    <profile>
      <providers>
        <clear />
        <add name="AppFabricCacheSessionStoreProvider" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="NamedCache1" sharedId="SharedApp"/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
      </providers>
    </profile>
+3
source share
3 answers

Include this in your web.config file:

using web.config

    <sessionState timeout="minutes"/> 

Using IIS

Change the following timeouts in the Internet Services Manager. Select a value that exceeds the default value of 20.

  • - > "" > " " > " " > "" > "".

  • - - 60 .

enter image description here

  1. > DefaultAppPool > .

  2. "" " " " " , 20.

enter image description here

- IIS 20 , 24 1440 .

+5

. , , -, - . , ...

  • . web.config, IIS, @Romil ( IIS, ).

  • Forms, -, web.config. ... system.web > authentication > forms node web.config " timeout" .

  • , ... IIS (verion 7.5 , , , ) " ". " " (, ) " - ()". - . - : sessionState > timeout cookie, , - , ( ) , , , cookie .

, - . , , , sessionState.

, G

+4

, , , - . , , 20 60 , , !

0

All Articles