我的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, 
Microsoft.ReportViewer.WebForms, 
Version=11.0.0.0, Culture=neutral, 
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>
但在我的应用程序中,会话永不过期。 我总能得到会话变量值。
我在配置中忘记了什么?
答案 0 :(得分:0)
确保系统的源代码没有设置
Session.Timeout值。
或者使用它:
**
<system.web>
<authentication mode="Forms">
<forms timeout="1"/>
</authentication>
<sessionState timeout="1" />
</system.web>
**