How to prevent (and monitorize) the configuration file watcher thread in EntLib4.1

Topics: Enterprise Library Core
Dec 21, 2010 at 12:22 PM

I use EntLib 4.1. I read blog that prevent configuration file watcher thread.

Any tool (freeware) for monitorize that thread, please, and how can I prevent for EntLib 4.1 (the same way for 3.1) ???



How to prevent the configuration file watcher thread in Microsoft Enterprise Library 3.1

I have not blogged very much the last time, but now I'm back to write about some interesting things again. Lets start with the Microsoft Enterprise Library. For some reasons we are still bound to version 3.1, so the following is valid for that version only - it might not work with the newer version 4.x yet available.

So what I'm writing about? If you ever run a trace tool for an application using the Entlib you might have considered a separate thread "ConfigurationChangeFileWather" (right, it is misspelled - but that thread name is set by the Entlib, sorry). How comes? If you don't need this service (config changes are monitored while the application is running) there is not much information about it how to disable that (especially if you run in ASP.NET with the Entlib). Google around, the most answers I found are: you cannot disable that without modifying the Entlib source code (you can, but who will ever really do this and maintain it over the versions?). So I will describe a scenario, how we use it and how we disable that thread (consuming resources, because it polls the file change date).

For all, that don't like to read the full story: you just have to call

FileConfigurationSource.ResetImplementation(filePath, false);
Dec 22, 2010 at 12:21 AM

I'm not aware of such tool. 

Didn't the code suggestion work for you?


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.