Beware Writing to the ‘Bin’ Folder in IIS Hosted Services
The other day we had a issue occur where one of our WCF web services hosted in IIS 6 was getting a ThreadAbortException while processing the first few requests. We had made a change to the service to perform some diagnostic logging and the data was being written to a subfolder in ‘bin’. This turned out to be the cause of our problem. Because of how IIS 6 works in conjunction with .NET, when the ‘bin’ folder is touched it initiated a recycle of the application pool because it thought files had changes. We moved the logging to save to App_Data and our troubles went away.
Buyer beware, if you write to ‘bin’ you might become the victim of a mysterious, but explainable, application pool recycle!
Comments are closed.

