本文介绍了如何在asp.net20分钟后停止会话超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用IIS6部署我的应用程序。无论我如何更改超时在IIS中配置或我添加了一个Global.asax文件来设置查看Session.Timeout,甚至20分钟后使用的sessionState,即时通讯仍然得到会话超时,这太疯狂了!有人帮帮我吗?我是如此坚持。

web.config中:

 <身份验证模式=表格>
          <形式的名称=__ authcookieloginUrl =LoginPage.aspx超时=60保护=全部requireSSL =假slidingExpiration =真正的无Cookie =UseDeviceProfileenableCrossAp predirects =FALSE/ >
      < /认证>
      <的sessionState模式=是InProc超时=60customProvider =AppFabricCacheSessionStoreProvider>< /&的sessionState GT;
    <会员和GT;
      <供应商>
        <清/>
        <添加名称=AspNetSqlMembershipProviderTYPE =System.Web.Security.SqlMembershipProvider的connectionStringName =ApplicationServicesenablePasswordRetrieval =假enablePasswordReset设置=真requiresQuestionAndAnswer =假requiresUniqueEmail =假maxInvalidPasswordAttempts =5minRequiredPasswordLength =6minRequiredNonalphanumericCharacters =0passwordAttemptWindow =10的applicationName =//>
      < /供应商>
    < /会员>
    <型材>
      <供应商>
        <清/>
        <添加名称=AppFabricCacheSessionStoreProviderTYPE =Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvidercacheName =NamedCache1sharedId =SharedApp/>
        <添加名称=AspNetSqlProfileProviderTYPE =System.Web.Profile.SqlProfileProvider的connectionStringName =ApplicationServices的applicationName =//>
      < /供应商>
    < / profile文件>


解决方案

这包括在你的web.config文件:

使用的web.config

 <的sessionState超时=分钟/>

使用IIS

更改以下超时Internet服务管理器。选择的值大于20的默认越大。


  1. 选择默认Web站点>属性>主目录>应用程序设置>配置>选项。


  2. 启用会话状态超时,并设置会话超时60分钟。



  1. 选择应用程序池>默认应用>属性。


  2. 从下空闲超时性能选项卡,在空闲的值设置后关闭工作进程高于20。


默认会话超时IIS上设定为20分钟,但它可以被增加到最大的24小时或1440分钟

I am using iis6 to deploy my application. No matter how i change the timeout in iis configuration or i add a global.asax file to set Session.Timeout, or even used a sessionstate, im still getting session timeout after 20minutes, this is crazy! anyone please help me? i am 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>
解决方案

Include this in you web.config file:

using web.config

    <sessionState timeout="minutes"/>

Using IIS

Change the following time-outs in Internet Services Manager .Choose a value greater than the default of 20.

  1. Select Default Web Site > Properties > Home Directory > Application Settings > Configuration > Options.

  2. Enable the session state time-out and set the Session timeout for 60 minutes.

  1. Select Application Pools > DefaultAppPool > Properties.

  2. From the Performance tab under Idle timeout, set Shutdown worker processes after being idle for a value higher than 20.

The default session time-out setting on IIS is 20 minutes but it can be increased to a maximum of 24 hours or 1440 minutes.

这篇关于如何在asp.net20分钟后停止会话超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 10:25