3
votes

I have an ASP.NET application with Web.appSettings.config. Exactly in web.config I have included this line:

<appSettings configSource="Web.appSettings.config" />

and in web.appSettings.config

<?xml version="1.0"?>
<appSettings>
  <add key="foo" value="foo value" />
</appSettings>

I have tested it myself. If I change something web.config the IIS App pool recycles. But seems that if I change something in web.appSettings.config it doesn't recycle.

Changes in web.appSettings.config... are supposed to trigger an Application Pool recycle?

Is there any official Microsoft link that clarifies it?

CLARIFICATION: My tests shows that changes in web.appSettings.config shows that no app pool recycle is triggered. My doubt is about expected behavior. Is it normal that app pool doesn't recycle or is there something wrong with my IIS..?

2
afaik only changes in web.config file fire app pool recycle (this behavior can be altered). The changes in related files (defined through configSource) don't trigger recycling.Vsevolod Goloviznin
My tests seems to indicate the same but I didn't found any link on MSDN or similar to confirm it so I am not 100% sureOscar Foley
In that link explains that changes in web.config triggers a recycle but doesn't clarify if changes web.appsettings.config (or similar) should trigger or not a recycle...Oscar Foley
It lists all the things that DO cause a recycle. It also doesn't mention whether a recycle will happen during a full moon, doesn't mean your IIS is broken :)DavidG

2 Answers

4
votes

No, it doesn't.

But instead of relying an answer from here, I would test it myself.

For example; when the application pool recycles, it means your application will restart. Put a breakpoint in your Application_Start event in global.asax. Update web.config, make a request to your page and see if it hits. Then update web.appsettings.config file and try the same. In the second case the breakpoint should not hit.

You can also understand it by logging the events (or probably checking existing IIS logs etc.) as well.

1
votes

Changes in Web.config triggers an AppDomain recycle, not an AppPool recycle.