ASP.NET session has expired

Discussion in 'ASP.NET 2.0' started by lbarker, May 18, 2008.

  1. Hi,

    I am using the ReportViewer control in my ASP.NET page and am getting the error "ASP.NET session has expired ".

    If I go to Report Manager and run the report directly then it works.

    The strange thing is that it works fine with Firefox but not IE 7.

    Has anyone experienced this while using the ReportViewer control?

    Thanks,
    Lee.
     
  2. Report Viewer use session state. My session expire in 30 min and I catch exception in
    private void Application_Error(object sender, EventArgs e)
    and rewrite it as I showed in the screen short. I suppose your IE do not permit cookies. Try to change web.config:
    <system.web>
    <sessionState
    mode="InProc"
    timeout="30"
    cookieName="MyCookie"
    cookieless="true"
    regenerateExpiredSessionId="true"
    </o:p>
    Alexei Cioina
    http://www.californiadreamhomesandland.com</o:p>
     
  3. Cheers for this.

    I'm with a third party hosting company and they are looking to install SQL Server State for me. I did check out the InProc version but the blog said that SQL Server would be more reliable.

    However I will give it a go and let you know.

    Thanks,
    Lee.
     
  4. Main thing in my example is cookieless="true" (not mode="InProc"). I suggest you cookieless="true" to test if the problem is in your IE.
     
  5. Nice one! Great sense of humour, thanks!
     

Share This Page