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在每个请求上更改?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。