ASP.NET会话已过期或无法找到 – >因为Session.SessionID发生更改(Reporting Services)

前端之家收集整理的这篇文章主要介绍了ASP.NET会话已过期或无法找到 – >因为Session.SessionID发生更改(Reporting Services)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
1.-我正在使用报告服务,有时我收到此错误ASP.NET会话已过期或在我尝试加载报告时找不到.

2.-我意识到,即使用户是相同的,Session.SessionID属性也会发生变化.如果它没有更改,则加载报告.我的意思是,如果我多次刷新报告,只要Session.SessionID与最后一个相同,就会加载报告.

3.-微软文档说:

When using cookie-based session state,ASP.NET does not allocate
storage for session data until the Session object is used. As a
result,a new session ID is generated for each page request until the
session object is accessed. If your application requires a static
session ID for the entire session,you can either implement the
Session_Start method in the application’s Global.asax file and store
data in the Session object to fix the session ID,or you can use code
in another part of your application to explicitly store data in the
Session object.

If your application uses cookieless session state,the
session ID is generated on the first page view and is maintained for
the entire session.

关键是我不能使用无cookie会话状态,因为我需要cookie.

我该怎么做才能避免这个错误?或者我该怎么做才能避免Session.SessionID在每个请求上更改?

解决方法

您可能正在存储会话InProcess.尝试将其更改为会话状态服务器.你可以找到更多细节 here.
原文链接:https://www.f2er.com/aspnet/248959.html

猜你在找的asp.Net相关文章