locked
Repeated AspNetSessionExpiredException errors, even after session has ended RRS feed

  • Question

  • User43736374 posted

    I have a traditional ASP.NET application written in VS 2010 against .NET 4.0.  It is hosted on a Windows 2003 server, with IIS 6.0.

    Within the application, I have a page with an SSRS Report Viewer (version 10) on it.  This connects to our SQL Server 2008 Report Server.  (It is not R2.)

    Every few months, I start to see errors, logged every nine minutes, that look like this:

    Exception information:
    Exception type: AspNetSessionExpiredException
    Exception message: ASP.NET session has expired or could not be found
    at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor()
    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)

    These errors are thrown repeatedly and without any clear end.  No user says they have ever seen evidence of them.  They continue after hours, long after everyone has logged out.  This latest "flare up" has gone on for nearly two days.  

    In the past, the only thing that seemed to stop them was:

    1. Stopping the website in IIS
    2. Deleting the virtual directory for the application
    3. Re-creating the virtual directory for the application
    4. Starting the website again

    What has not worked:

    1. Killing the w3wp process
    2. Forcing app pool recycling
    3. Bouncing our application server
    4. Bouncing our SQL Server

    Trouble is, my so-called fix is no longer working at this point, either!

    I considered writing some "shut up" logic to ignore errors of this specific type in global.asax, but this is unacceptable, because:

    1. My users are complaining about degraded performance
    2. The errors are still thrown, so performance degradation will continue regardless of what we do with the errors.

    Any help would be tremendously appreciated!

    Wednesday, May 21, 2014 1:30 PM

All replies

  • User1140095199 posted

    Hi,

    ssmock

    These errors are thrown repeatedly and without any clear end.  No user says they have ever seen evidence of them.  They continue after hours, long after everyone has logged out.  This latest "flare up" has gone on for nearly two days.  

    Could you POST more of your LOG details? It will be helpful to track what's going wrong.

    EDIT:

    Are you using Load Balancer?

    Regards!

    Friday, May 23, 2014 5:22 AM
  • User1284652241 posted

    Hi All,

    We seem to be having the exact same issue! 9 Minute intervals we're getting:

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired or could not be found

    at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor()
    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.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    We have also noticed that our pagehits logs hit /Reserved.ReportViewerWebControl.axd?OpType=SessionKeepAlive&ControlID=etc. every 9 minutes, so it seems to be a keep alive process which is failing and constantly retrying even after the session has died.

    We're working on our own solution now but just FYI for others

    Tuesday, November 25, 2014 9:35 AM
  • User1557877269 posted

    We are also experiencing the same error being logged every 9 minutes.  Have you learned anything new?

    The set up is similar.  Our custom website is based on ASP.NET:  web forms, .NET 4.5, SQL Server 2012, ReportViewer control on a page which we use to render an SSRS report.

    The scenario is that I open up our page, run a report that renders fine.  Then I leave it running, our case, overnight.   In IIS on our webserver, the app pool is set to recycle at a specific time over night.  This is what seems to cause the error to start logging every nine minutes.  The recycle happens at 1am, and the first error is logged at 1:01am and every 9 minutes thereafter until I close the report window.

    Interestingly enough, I have found that I remain "logged in" to our website... so the 

       ...Reserved.ReportViewerWebControl.axd?OpType=SessionKeepAlive...

    is definitely "pinging" the underlying system to keep the session alive.  However, the report is no longer "alive"... that is, if I tried to navigate to another page in the report, I get the "ASP.NET session has expired or could not be found" message displayed in the ReportViewer.

    It's also interesting that if I try to manual recreate the scenario, I can't do it.  That is, I log into my website, go to the reports page and run a report.  Then, I RDP into our webserver, go to IIS, and right-click the app pool and choose Recycle.  It doesn't seem to do the same "trick"...

    Thursday, April 2, 2015 10:12 AM