Search code examples
c#.netasp.netweb-confighttpmodule

detect web.config has been changed


I created an HTTPModule that should log reauests and responses.
The parameters that tells the http module how to work located in the web.config.
But, in order to let the http module work with the latest values of the parameters, each request I read the parameters from the app.config.

Is there a way I can detect changes in the web.config so I can reload the http module parameters instead of reading them each time there is a response?


Solution

  • You don't need to do that at all. You can load these properties only once and store them somewhere. Each time the web.config changes whole your ASP.NET application restarts and http module will have to initialize again.