Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top