Extend web.config Application Pool Recycling
I have noticed how editing the web.config file in an application folder causes that application pool to recycle and pick up the changes.
How does IIS achieve this and is it possible to extend this functionality for another config file? Or is this dependency hard-coded somewhere? This is 开发者_StackOverflow中文版related to the possiblity of deploying configuration changes to a web server without having to edit the web.config, which is usually maintained by a different team.
Note that I don't want to manually invoke this recycle event, but have it work in the same way as with web.config. I'm aware that I could simply add these settings to web.config, but that's not what I've been asked to do.
Many thanks, Robin
Actually the application pool is not recycle, just rebuild the site.
...to extend this functionality for another config file?
Well, when you change and save the other config file you can call this command to make rebuild the site
HttpRuntime.UnloadAppDomain();
精彩评论