ASP.NET session has expired or could not be found -> Because the Session.SessionID changes (Reporting Services)

前端 未结 10 1305
粉色の甜心
粉色の甜心 2020-12-31 10:04

1.-I\'m using reporting services and sometimes I get this error ASP.NET session has expired or could not be found when I try to load a report.

2.-I real

相关标签:
10条回答
  • 2020-12-31 10:33

    I had the same issue on report viewer page when the web site was accessed from outside intranet. hardvin's suggestion saved the day for me which is to set this.rvReporte.KeepSessionAlive = false; this.rvReporte.AsyncRendering = false;

    I changed the property on the control itself. I am using report viewer on a user control which raises a custom event for supplying parameters programmatically at the host page instead of prompting the users.

    0 讨论(0)
  • 2020-12-31 10:33

    For me, it turned out to be having more than one worker process for the app pool.

    0 讨论(0)
  • 2020-12-31 10:34

    You are probably storing your session InProcess. Try changing it to session state server. You can find more details here.

    0 讨论(0)
  • 2020-12-31 10:34

    The answer given by Alexsandar is just one of the solution to this problem.

    This link clearly explains what is the root cause for this problem and possible solutions: http://blogs.msdn.com/b/brianhartman/archive/2009/02/15/did-your-session-really-expire.aspx

    In case of Brian, the way he has descrived the problem, if he had just a single IIS server, using a session object in his code would have solved the problem because in that case, the SessionID which is passed in the request from browser to the server will get mapped to a corresponding sessionID on the server and hence the session expiry message will not come.

    Setting the mode may only work in case of a server cluster where Brian had multiple IIS servers handling the same request. In that case an out of process mode will help to retrieve the session object from the Session Store irrespective of the server hit.

    So based on this observation, I would conclude that Brian's problem was not related to cookies but to a server cluster. The information provided by Brian in his question and the subsequent solution misled me and hence this clarification. Hope it helps anyone looking for a similar problem.

    Thanks, Vipul

    0 讨论(0)
提交回复
热议问题