ASP.Net Session has expired

  • Hi when i try to run my reports using the report viewer the first page displays and when i move to the next page in the report viewer i get an error saying

    Asp.net Session has expired.

    Any help will be appreciate.

    Karen

  • This problem is most likely when using in-proc session state (the default). When you use in-proc session and have two worker processes, each one has its own independent version of session. As a result, if a request for the aspx page is routed to one worker process, but the request for the report content goes to the other process, the second request will not find a session and assume it has expired, generated the error you see. The two ways to work around this are to either use only a single worker process or to use out-of-proc session state, such as SQL Server. See this article for more details: http://msdn2.microsoft.com/en-us/library/ms178586.aspx

    Hope i may be helpful to you.

    Thanks

    Meghna

  • Secondly If your webserver name contains "_" you will see this weird error. Try http://IPAddress/AppName.

    I had the similar error and this fixed it.

    hope any of these fix your prob.

    Good luck Karan!

  • Meghana,

    Thanks for your answer.. I got it work.. There was Column that was pointing to a different domains IP address and before loading the reports SSRS searched and couldnt find it.. after giving the right IP address in the database it worked fine..

    Thanks..

    Karen

  • Thats Great!

    Meghna

  • I've had problems with this too. I've looked into the Session state issue and opted for SQL Server against In Proc.

    However it didn't solve the problem which is caused by a bug in the ReportViewer control concerning IFRAMES.

    I opted to set AsyncRendering to False in the control:

    <rsweb:ReportViewer AsyncRendering="false" ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

    Height="400px" ProcessingMode="Remote" Width="904px">

    This avoids IFRAMES at the expense of a slower page load, but since the control sits by itself (in my page) that's not an issue for me.

    Lee.

  • i tried doing that and it didnt help too.. but since i was getting a field that has a path to some pics... and since we changed domains and servers it was still looking for that path and hence i used to get that error.. once gave the right address or path it worked fine.

  • Hi Karen,

    Are you using VS2005 or later? It seems that we may have encountered the same error but for different reasons.

    My problem didn't exist when I used FireFox so my suspicions were raised with regards to IE 6 + 7.

    I read somewhere that Microsoft admitted a problem with Frames in IE 6/7. I reckon I will have problems when I start using the fancy charts in my reports.

    Cheers,

    Lee.

  • I havent used Iframes for my report viewer... i am just showing them on a table.. using the tr and td tags.. those reports were written using VS2005 and i have tested them in IE 7 and probably 6 and they work fine...

  • Hi,

    When you declare the ReportViewer in your aspx file (I assume that's the case) are you using <rsweb:ReportViewer... or <asp:ReportViewer .... ?

    I have mine placed between tags so I'm scratching my head as to why I had the problem, unless you have another version of the control. Also, are you hosting remotely or on your local machine?

    This has been a puzzler for me.

    Lee.

  • I have placed them in between rsweb:reportviewer and have not used asp:reportviewer..

    Are your reports stored on the report server? or are they local reports...all my reports are run using the report server??

  • That's probably it. I'm using the <rsweb.... in my aspx and then this in my code behind:

    ReportViewer1.ServerReport.ReportPath = "/ /reports/test"

    I guess this is a local way of doing things?

    I used to have the situation where I simply pasted the Reportserver url into basic hyperlinks, but had to change that method when I found that my host provider used https security - which was of no use for anonymous users who just land on my site.

    I think you have hit the nail on the head.

    Thanks.

    Lee.

  • Thats the right way of using it.. and this is what i have done in my aspx page

    rsweb:ReportViewer ID="ReportViewer1" runat="server" BackColor="Transparent" Height="410px" ProcessingMode="Remote" SizeToReportContent="True" Width ="800px" AsyncRendering="False"

    ServerReport ReportServerUrl="http://ipaddress/reportserver" /

    </rsweb:ReportViewer

    and this in my aspx.vb file

    ReportViewer1.ProcessingMode = ProcessingMode.Remote

    ReportViewer1.ShowCredentialPrompts = True

    ReportViewer1.ShowExportControls = False

    ReportViewer1.ServerReport.ReportServerCredentials = New ReportServerCredentials() --this is .vb file which gives credentials to the report server

    ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://ipaddress/ReportServer")

    ReportViewer1.ServerReport.ReportPath = "/ReportFolder/reportname"

    Hope this helps..

  • Hi Karen,

    Thanks for providing this.

    I've compared with my version and can see no obvious difference other than the fact that my work is hosted elsewhere and uses https, but I use a vb validation script too, called by the Page_Load.

    In the vb I have the line - authCookie = Nothing - so I don't know if it's a cookie issue.

    Anyhow, thanks for your feedback.

    Regards,

    Lee.

  • our servers are hosted in denver.CO and we are in NC.. but our reporting service box and the sql box are on one system and the webservers are running on different boxes and all our webservers use https.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic. Login to reply