I'm hosting the ASP.NET runtime via the ApplicationHost.CreateApplicationHost
method. When I modify the web.config
while the application is running, i see lots of first chance ThreadAbortException
s thrown. This is right before my application comes crashing down. I'm assuming this is because the runtime has detected changes to the configuration and wants to restart.
This isn't really a supported scenario for us, so i'd prefer if I could just switch off the automatic reloading.
Does anyone know how to do this?
As far as I am aware there is no way to disable this behavior, changes to the webconfig force the application to be restarted.Update: it is actually possible, there are a number of methods, well documented, as explained in this answer*
Original answer:
There is a similar question here just for other reference. I found additional info that may be helpful.
From This MSDN Article
* Disclaimer: I wrote the other answer and normally wouldn't make a self-reference, but find it relevant enough to link here since 8 years after this post it is really quite different: a solution is very easy by clicking through the IIS front-end, and workarounds exist since ASP.NET 1.0.