【问题标题】:asp.net session timeout don't occuringasp.net 会话超时不会发生
【发布时间】:2015-10-02 04:14:17
【问题描述】:

我的 web.config 有这个 system.web 部分:

  <system.web>
    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
    </httpHandlers>
    <compilation debug="true" targetFramework="4.5.1">
      <assemblies>
        <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, &#xA;Microsoft.ReportViewer.WebForms, &#xA;Version=11.0.0.0, Culture=neutral, &#xA;PublicKeyToken=89845dcd8080cc91" />
      </buildProviders>
    </compilation>
    <pages theme="Padrao" validateRequest="false" controlRenderingCompatibilityVersion="4.0" clientIDMode="Static">
      <controls>
        <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" namespace="Microsoft.Reporting.WebForms" tagPrefix="rsweb" />
      </controls>
    </pages>
    <sessionState timeout="1" />
    <httpRuntime targetFramework="4.5.1" maxRequestLength="2097151" />
  </system.web>

但在我的应用程序中,会话永不过期。 我总能得到会话变量的值。

我在配置中忘记了什么?

【问题讨论】:

    标签: asp.net session-variables session-state session-timeout


    【解决方案1】:

    确保系统源代码没有设置

    Session.Timeout值。

    或者使用这个:

    **

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

    **

    【讨论】:

    • 没用。到下一页的时候,还是能拿到session变量里面的值。
    猜你喜欢
    • 2010-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-03
    • 2011-02-03
    • 2020-07-23
    相关资源
    最近更新 更多