简体   繁体   中英

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 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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM