Just installed and got running a web application in .net 2.0 using Ent Lib 2.0 Logging. Was trying to move on to get logging configuration for different environments. This used to be done in Ent Lib 1.0 using
Olaf Conijn's
Application Block. I guess we'll have to wait until he's written that unless there's an easier way of doing it.
Tom Hollander mentions the same path...
The documentation for each Application Block is very good and details it a lot better than 1.0. I remember seeing v1.0 and thinking...how the hell do I use this!
Olaf has also written some neat extensions already which are impressive. Maybe I'll sit down and work out some that could be useful to the community.
UPDATEAfter having a look further into the new Configuration Application block you can actually add new File Configuration Sources which create new config files and then in the web.config you just set the selectedSource field to point to the instance you want.
The only problem with this is that it would be nice to automate this by intelligent working out what environment the application is running in for web applications. I wonder if you can override what selectedSource you use in the Init of the web application.
[code]
<enterpriseLibrary.ConfigurationSource selectedSource="TEST">
<sources>
<add name="DEV" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
filePath="C:\Documents and Settings\jthake\My Documents\Visual Studio 2005\WebSites\WebSite3\dev.exe.config" />
<add name="TEST" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
filePath="C:\Documents and Settings\jthake\My Documents\Visual Studio 2005\WebSites\WebSite3\test.exe.config" />
</sources>
</enterpriseLibrary.ConfigurationSource>
[/code]
The other neat thing with this is you can have these config files all open in the Enterprise Library Configuration application.