Is it possible for IIS 6 to spawn more than one worker process even after I have set max number of worker process to one? If yes, under what condition? Maybe during application pool recycle?
I’m asking because I have been getting errors like The process cannot access the file ‘mylogfile.txt’ because it is being used by another process.
I suspect I got this error because there are more than one IIS worker running my ASP.NET MVC 3 app, and the apps try to write to the same log file at the same time. I’m pretty sure there are no other applications opening the log file. I’m also pretty sure the logging library (Essential Diagnostics) is able to handle multiple threads (not processes) trying to write log at the same time.
Is there a way to check this at the time it is happening?
Yes, the IIS Worker process can spawn more instances for any of the following reasons,