开发者

Can ApplicationState Expire like SessionState in ASP.NET?

开发者 https://www.devze.com 2023-02-01 00:22 出处:网络
There is 开发者_如何学运维a timeout for Session object of HttpSessionState that can be set. I want to see if we can make HttpApplicationState timeout too?Using the Cache, this can be achieved very eas

There is 开发者_如何学运维a timeout for Session object of HttpSessionState that can be set. I want to see if we can make HttpApplicationState timeout too?


Using the Cache, this can be achieved very easy.


No, you can't make it expire this way.

Why? Because it is supposed to be valid so long as the application is running.

If you want to make an application state value that will expire, you can implement such a function yourself, using one of the timer classes.

0

精彩评论

暂无评论...
验证码 换一张
取 消