In the asp.net webservice, I have a static dataset that loads data (synchronized) upon first time access. However, when IIS recycle the app pool, I have exception thrown because of "Collection was modified; enumeration operation might not execute."
The recycle will start the new process, which will create new static dataset, the requests in old worker process will not access the new static dataset, how can the collection been modified? Or is that possible, the old worker process terminates immediately before the requests finish off?
Or do I understand the recycle process wrong? Rather than starting new worker process, IIS starts new AppDomain in the same worker process? and old and new appDomains sharing the same static dataset?