Reputation: 8336
I have an asmx web service and I load bunch of system data to internal data structures. This system data is used to check the validity of requests. However when there is no requests for say 3 hours (maybe less) the initializations are done again. The object that serves the requests has
private static bool _initOk
variable that controls the initialzation. When application is idle the variable is set to false. Is it because IIS stops the execution and dll containing the code is unloaded or something? If requests arrive on steady interval the initializations are not done again. Is there anything I can do about it?
Thanks!
br: Matti
Upvotes: 1
Views: 728
Reputation: 5944
It is a setting of the application pool (found under IIS Manager), whether to stop the process, when it is iddle for a period of time, or wether to restart (recycle) it when certain conditions are met.
On each restart of the process, your initialization will be done again.
Upvotes: 7