1

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

char m
  • 7,840
  • 14
  • 68
  • 117

1 Answers1

7

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.

treaschf
  • 5,788
  • 1
  • 25
  • 24
  • thanks! I found a setting: Application Pool->Performance->Idle timeout->Shutdown worker processes after being idle of (time in minutes). So unchecking this should do (?) – char m Jan 12 '10 at 11:22
  • You should uncheck this, and also uncheck on the next tab the options for recycling the application pool. – treaschf Jan 12 '10 at 12:03
  • cheers! i hope this other option (recycling) will finally do the trick. Application Pool->Performance->Idle timeout->Shutdown did not help since the process was recycled after a period of time... – char m Jan 15 '10 at 11:23