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

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

问题描述

1.-我正在使用报告服务,有时会收到此错误 ASP.NET会话已过期或找不到,当我尝试加载报告时.

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.-Microsoft文档说:

3.-Microsoft Documentation says:

使用基于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.

如果您的应用程序使用无cookie会话状态,则会话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.

问题是我无法使用无cookie会话状态,因为我需要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更改(Reporting Services)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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