Search code examples
asp.netreportviewersession-state

ASP.NET session expired


I am seeing an exception logged in my error logs which is Microsoft.Reporting.WebForms.AspNetSessionExpiredExceptionAsp.net.

But I am not being able to reproduce it. After doing google search I understood that it is because of session expiring.

My question is, what would be some reasons for this error and is there any way I can reproduce it by manually clearing the session?

Error log:

15/12/2015 09:08:11Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired or could not be found at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor() at Microsoft.Reporting.WebForms.ReportDataOperation..ctor(Boolean requiresFullReportLoad) at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType) at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor() at Microsoft.Reporting.WebForms.ReportDataOperation..ctor(Boolean requiresFullReportLoad) at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType) at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Solution

  • you can set session timeout value in your webconfig that is the way you can check it

    <configuration>
      <system.web>
         <sessionState timeout="20"></sessionState>
      </system.web>
    </configuration>