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.

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....