ASP.NET 会话已过期或无法找到 ->因为 Session.SessionID 更改(报告服务) [英] ASP.NET session has expired or could not be found -> Because the Session.SessionID changes (Reporting Services)

查看:42
本文介绍了ASP.NET 会话已过期或无法找到 ->因为 Session.SessionID 更改(报告服务)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.-我正在使用报告服务,有时我会在尝试加载报告时遇到此错误ASP.NET session has expired or could not be found.

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.-我意识到当 Session.SessionID 属性更改时,即使用户相同,我也会收到此错误.如果它没有改变,则加载报告.我的意思是,如果我多次刷新报告,只要 Session.SessionID 与上一次相同,就会加载报告.

2.-I realized that I get this error when the Session.SessionID property changes even though the user is the same. If it does not change, the report is loaded. I mean, if I refresh the report a number of times, whenever the Session.SessionID is the same than the last one, the report is loaded.

3.-微软文档说:

当使用基于 cookie 的会话状态时,ASP.NET 不会分配会话数据的存储,直到使用 Session 对象.作为一个结果,为每个页面请求生成一个新的会话 ID,直到会话对象被访问.如果您的应用程序需要静态整个会话的会话 ID,您可以实现应用程序的 Global.asax 文件和存储中的 Session_Start 方法Session 对象中的数据来修复会话 ID,或者您可以使用代码在应用程序的另一部分显式存储数据会话对象.

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.

如果您的应用程序使用 cookieless 会话状态,则会话 ID 在第一次页面查看时生成并维护用于整个会话.

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

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

The point is that I can not use a cookieless session state because I need cookies.

我该怎么做才能避免这个错误?或者我可以做些什么来避免 Session.SessionID 在每次请求时更改?

What could I do to avoid this error? Or What could I do to avoid the Session.SessionID to change on every request?

推荐答案

您可能正在存储会话 InProcess.尝试将其更改为会话状态服务器.您可以在此处找到更多详细信息.

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

这篇关于ASP.NET 会话已过期或无法找到 ->因为 Session.SessionID 更改(报告服务)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆