[英]How do I store per-request state in EWL?
I want to store some state whose lifetime is the request. 我想存储一些生命周期为请求的状态。 I believe I used to be able to store state manually in AppRequestState, but that class no longer provides that capability. 我相信我曾经能够在AppRequestState中手动存储状态,但是该类不再提供该功能。
As a fallback I am going to store the state in Session, but I'd prefer its lifetime were just the request, not the session. 作为后备,我将状态存储在Session中,但我希望状态的生存期仅是请求,而不是会话。 What is the most supported way to do this in EWL? 在EWL中,最受支持的方法是什么?
EWL deliberately doesn't let you store your own per-request state since it's really easy to get into trouble by doing this. EWL故意不允许您存储自己的每个请求状态,因为这样做很容易惹麻烦。 See "Letting pages store request-scoped data" here: 请参阅此处的“退出页面存储请求范围的数据”:
https://enduracode.fogbugz.com/default.asp?W6 https://enduracode.fogbugz.com/default.asp?W6
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.