none
ASP.NET Session has expired, ReportViewer RRS feed

  • Question

  • I have 4 reports (RDL files) viewing on a webpage using the reporting services reportviewer.  The reports are being dispayed within iFrames.  When I frist launch the page I get session expired errors in my iFrames.  I've searched and found a few things that I've tried but none have solved the problem (increased the timeout in a reporting services config file, increased time out on the ASP.NET session state settings on IIS).  The error is as follows.  Please help!

    ASP.NET session has expired
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [AspNetSessionExpiredException: ASP.NET session has expired]
       Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +550
       Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType) +470
       Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +44
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

     

    Sunday, August 9, 2009 6:07 PM

All replies

  • I have a blog posting on this exception that may be useful in debugging your specific situation:
    http://blogs.msdn.com/brianhartman/archive/2009/02/15/did-your-session-really-expire.aspx

    Wednesday, August 12, 2009 3:06 AM
    Moderator
  • Hi Brian,

    Thanks for the link -- unfortunately I don't think any of those relate to my issue.  I'm currently only in a demo environment where SQL, reporting services, and IIS are all on the same machine from which I am viewing the web page (through http://localhost/.. I've also tried computer name and IP address).  The error happen at first launch of the page, but not on a subsequent refresh.  So the session isn't expiring, there are no load balancing/web garden issues, and lastly I did double check cookie settings in IE to ensure all was good and they are enabled.

    I made a litte progress (maybe?) by adding the setting AsyncRendering="False" to the Report Viewer section of the ASPX being called in my iFrames.  By doing this I don't get the Session Expired error, but instead some of the reports are viewing as a broken image --- blank rectangle, little red x in top left corner.  So I don't really know if I've fixed anything or if I've just masked the error with something else.

    Anyways -- totally stuck on this one.  I have another post on the current situation here:
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/9199fc14-2661-448e-bb67-0e06cc5390a7

    Any suggestions would be great,
    Scott
    Thursday, August 13, 2009 1:32 AM
  • I have 4 reports (RDL files) viewing on a webpage using the reporting services reportviewer.  The reports are being dispayed within iFrames.  When I frist launch the page I get session expired errors in my iFrames.  I've searched and found a few things that I've tried but none have solved the problem (increased the timeout in a reporting services config file, increased time out on the ASP.NET session state settings on IIS).  The error is as follows.  Please help!

    ASP.NET session has expired
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [AspNetSessionExpiredException: ASP.NET session has expired]
       Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +550
       Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType) +470
       Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +44
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

     



    Try turning session state On in Report Server "web.config" located in
    C:\Program Files\Microsoft SQL Server\~\Reporting Services\ReportServer

    <

     

    sessionState mode="Off" /> to <sessionState mode="InProc" />

    of course take a backup of the web.config file Before making any modification!

    Hope this helps
    • Proposed as answer by Guru Karnik Friday, July 30, 2010 3:15 AM
    Sunday, September 13, 2009 8:51 AM
  • Whether this issue has been solved I am face the same scenario Any Help...?
    Tuesday, September 7, 2010 1:58 PM
  • This is an old question, but I recently ran into the same issue. What I found in my scenario was that the request was taking so long that the session lock expired. The report would then render, but wouldn't save the session. When the viewer did its async post-back, it couldn't find the report state in session so I'd get the session expired message.

    The only way I found to increase the session lock timeout was to increase the executionTimeout on the httpRuntime element in web.config.

    I then found that the async-postback was sometimes timing out because the ScriptManager has a separate AsyncPostBackTimeout that also needed to be increased.

    Thursday, July 23, 2015 6:31 PM