views:

50

answers:

2

Can values from web.config be read completely at runtime or does the application make a copy of the current web.config upon initialization.

Essentially, I'm wandering if I make a change to web.config if it will take effect on the users next postback or if they would need to initialize an entirely new page load. In particular, I'm interested in sections of the web.config like sesssionState and when a change to timeout would take effect.

+2  A: 

If you make a change to any config file that is inherited down into the application, including the Machine.Config, then the Asp.Net runtime will force your application to recompile. Essentially the next request against the server that touches that config chain will cause a re-compile.

Josh
+1  A: 

When you make a change to the Web.config file, the application will automatically restart. Every new request (be it a Postback or anything else) will be treated with the new configuration.

Bruno Reis