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在每个请求上更改?