ASP.NET session has expired or could not be found RRS feed

  • Question

  • User-372773582 posted

    I have a Report Viewer connected to an SSRS report on a SQL Server.  I setup error logging in the global.asax so it sends me an email.  I keep getting these errors with my report viewer.  The user is unaffected and never sees the error occur.  Its like the IIS sessions having some issue?  Anyone ever seen this?

    Error Caught in Application_Error event
    Error in: http://sales.test.com/Reserved.ReportViewerWebControl.axd?OpType=SessionKeepAlive&ControlID=42d3fa58b1b2401983ee1e5ebc4da677
    Error Message:ASP.NET session has expired or could not be found
    Stack Trace:   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)

    Wednesday, March 11, 2015 2:02 PM


  • User1644755831 posted

    Hello homeguards,

    In ASP.NET 

    "When using cookie-based session state, ASP.NET does not allocate  storage for session data until the Session object is used. As a  result, a new session ID is generated for each page request until the  session object is accessed. If your application requires a static  session ID for the entire session, you can either implement the  Session_Start method in the application's Global.asax file and store  data in the Session object to fix the session ID, or you can use code  in another part of your application to explicitly store data in the  Session object. If your application uses cookieless session state, the  session ID is generated on the first page view and is maintained for  the entire session."

    You get this error because you may be using In Process Session state. Try changing it to session state server.


    Hope this helps,

    With Regards,

    Krunal Parekh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 12, 2015 4:44 AM