Retain value in HttpModule
-
I've written custom httpmodule and it's being called up for every request. I want to store the value on my first request and this value needs to be retrieved for subsequent request. Is this possible in HttpModule? I know HttpContext.Current.Items preserve the value only for single request and we cannot use Session in our project as per our requirements. DO we have any other option apart from session\HttpContext.Current.Items for storing values in HttpModule?
-
I've written custom httpmodule and it's being called up for every request. I want to store the value on my first request and this value needs to be retrieved for subsequent request. Is this possible in HttpModule? I know HttpContext.Current.Items preserve the value only for single request and we cannot use Session in our project as per our requirements. DO we have any other option apart from session\HttpContext.Current.Items for storing values in HttpModule?
You'll need to store the data in a cookie.
-
I've written custom httpmodule and it's being called up for every request. I want to store the value on my first request and this value needs to be retrieved for subsequent request. Is this possible in HttpModule? I know HttpContext.Current.Items preserve the value only for single request and we cannot use Session in our project as per our requirements. DO we have any other option apart from session\HttpContext.Current.Items for storing values in HttpModule?
Have you tried using Cache? You can use built-in Cache or use third party Caching System
Venkatesh Mookkan (My Recent Article: WPF Custom Control - FilterControl for ListBox/ListView)