Playing around with Enterprise Library

Published Wed, Mar 16 2005 4:35 PM

A couple of weeks ago I was evaluating the different options a software developer has to instrument his application. I did this because I'm writing application guidelines for applications that are supposed to be hosted on a generic .NET platform and we wanted to standardize monitoring and logging to ease maintenance of all those applications.

As part of that I evaluated the Logging and Instrumentation Application Block of Enterprise Library. In fact, EntLib delivers almost everything I needed, so I now favor EntLib in my guidelines. One the biggest pro's of EntLib is the configuration console which allows for on-the-fly reconfiguration of the Instrumentation in a pretty intuitive way with a nice UI. No more editing of complex XML-files, so less change on breaking an application by typos.

While at it, I thought EntLib could also tackle another concern for my guidelines, which is secure storage of configuration settings. Here's where the trouble started. Although it only took me minutes to produce an application that could read and write configuration settings and have them encrypted, I couldn't edit them through the configuration console. This is a big issue, because one of the nice 'features' of encrypted settings is that you can't edit them through notepad. Without the ability to use configuration console you're stuck to writing a configuration application to configure your application or extend your application with a configuration function (which probably is a bigger risk to your application than storing unencrypted settings). Both approaches make me unhappy.

There is light in the darkness though, but it isn't very bright. If you do want to configure your settings through the configuration console you can extend the console. The only serious way to do that I found so far (I'm no expert yet, so I might miss something) is by providing a custom application block. I've played around with that the last few days and it's certainly doable, but it didn't make me happy either. It's a whole lot of work to be able to store and manage sensitive settings like a FTP username and password.

Another light comes from former college and brilliant developer, mister Conijn. He has also spotted this weakness and started a development project that allows you to provide an XSD to the configuration console to manage arbitrary settings. I think he started himself a rough but honorable job. Untill he's done or EntLib 2.0 fixes it (I hope), I think I manage my configuration settings in another way. How do you manage your settings?

Comments

# TrackBack said on Thursday, March 17, 2005 1:54 PM