none
"ASP.NET session has expired" while exporting. RRS feed

  • Question

  • Hello all,

    I have this (sort of weird) configuration:

    1. WinForm application
    2. Forms-Authenticated ASPX page that dynamically loads rdlc files and fills them with dynamically generated datasets

    My server side is forms-authenticated and WSE3 enabled under direct authentication via the winform client. I assume this problem has something to do with the fact that the pop-up export screen is in a different process than the winform application (which does have authenticated access to web pages) but changing the InProc setting hasn't worked well for me.

    Mind you, the report itself is working properly, but I have been receiving this error while trying to export:


    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() +802 Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +273 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +15 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +499 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +177 


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42



    My relevant configuration in the web.config file is as follows:

     <system.web>
      <httpHandlers>
       <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
      </httpHandlers>
      <compilation debug="true" defaultLanguage="c#">
       <assemblies>
        <add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Runtime.Serialization.Formatters.Soap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
       <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
       </buildProviders>
      </compilation>
      <trust level="Full" originUrl=""/>
      <customErrors mode="Off"/>
      <identity impersonate="true"/>
      <authentication mode="Forms">
       <forms loginUrl="Login.aspx" protection="All" timeout="7200" cookieless="AutoDetect" name="EmErp_Auth"/>
      </authentication>
      <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" timeout="7200" cookieless="false" cookieName="EmErp_Session"/>
      <authorization>
       <!--
       <allow users="*" />
       <deny users="?"/>
       -->
       <deny users="?"/>
      </authorization>
      <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
      <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
      <webServices>
       <soapExtensionTypes/>
       <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
       <soapExtensionImporterTypes>
        <add type="Microsoft.Web.Services3.Description.WseExtensionImporter, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
       </soapExtensionImporterTypes>
      </webServices>
      <xhtmlConformance mode="Legacy"/>
     </system.web>

     <location path="Reserved.ReportViewerWebControl.axd">
      <system.web>
       <authorization>
        <allow users="?"/>
       </authorization>
      </system.web>
     </location>

    Please help ^^
    Shai

    System.Diagnostics.Trace.WriteLine("o.O");
    • Edited by Shai On Tuesday, August 5, 2008 3:26 PM a small change
    Tuesday, August 5, 2008 3:25 PM

All replies