N
Natan
Hi!
I have an object stored in the HttpApplicationState collection of my
site, but i would like to mantain the state of this object even if the
application restart, so in case of any problem or when I change
something in the web.config or add anything to the bin directory, i can
load the last values from somewhere and continue the work.
I'm using serialization to accomplish this, and it works ok. But i'm
serializing the object to a file in the "HttpApplication.EndRequest"
event. The problem is that with this event, it saves the file in the end
of every instance of HttpApplication, which occours almost every second.
I tested locally, and it saves the file everytime i access any page.
I know that the HttpApplicationState is shared among all the instances
of HttpApplication, and I would like to save the file only before
ApplicationState is destroyed, not the application...
There is no event in HttpApplicationState, so is there any way of doing
this???
Thanks in advance.
I have an object stored in the HttpApplicationState collection of my
site, but i would like to mantain the state of this object even if the
application restart, so in case of any problem or when I change
something in the web.config or add anything to the bin directory, i can
load the last values from somewhere and continue the work.
I'm using serialization to accomplish this, and it works ok. But i'm
serializing the object to a file in the "HttpApplication.EndRequest"
event. The problem is that with this event, it saves the file in the end
of every instance of HttpApplication, which occours almost every second.
I tested locally, and it saves the file everytime i access any page.
I know that the HttpApplicationState is shared among all the instances
of HttpApplication, and I would like to save the file only before
ApplicationState is destroyed, not the application...
There is no event in HttpApplicationState, so is there any way of doing
this???
Thanks in advance.