Patrice Calve

Life's short, have fun
posts - 51, comments - 49, trackbacks - 31

My Links

News

Archives

Post Categories

Image Galleries

Problem with Enterprise Library Logging: Section or group name '
' already defined

Hi,

I just installed release June 2005 of Microsoft Enterprise Library and I'm trying out an Hello World of the Logging Block.

Here are the steps I did:

  • I created a Windows Form (C#, Visual Studio 2003). 
  • Added the reference to the library: Microsoft.Practices.EnterpriseLibrary.Logging and added the

    using Microsoft.Practices.EnterpriseLibrary.Logging;

  • Launched the “Enterprise Library Configuration“ tool. 
  • Created an application
  • Added Logging.
  • Saved the configuration to App.Config in my project
  • Switched to the Visual Studio
  • Did a “Show all files“
  • added the app.config, logging*.config
  • Created a post build event to copy the loggin*.config to my target folder
  • Added this code:

    private void Form1_Load(object sender, System.EventArgs e)

    {

    Logger.Write("Starting", "Trace",1);

    Logger.Write("Started", "Trace",1);

    }

  • Run
  • And got this error:

An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll

Additional information: Section or group name 'enterpriselibrary.configurationSettings' already defined

I want to resolve it.  I think I understand how this error can come up, but can't understand why I get it.

Anyone seen this?

Pat

Print | posted on Monday, August 29, 2005 1:21 PM |

Feedback

Gravatar

# re: Problem with Enterprise Library Logging: Section or group name '<section>' already defined

Make sure the machine.config and web.config don't have conflicting settings.
8/30/2005 5:01 AM | Johnny C#
Gravatar

# re: Problem with Enterprise Library Logging: Section or group name '<section>' already defined

Haaaaaaaa crap... the simple things !

That was it. I traced it and then saw the call to machine.config. machine.config had the entry.

Thanks Johnny

Pat
8/30/2005 5:03 AM | Patrice Calve
Gravatar

# re: Problem with Enterprise Library Logging: Section or group name '<section>' already defined

Hi,

I had an application running the Jan 2005 version. Now I have deployed an application running the ES-June 2005 version. Now, the first application is throwing the same config error. Checked the machine.config too.

Please help.

Susmitha (susmitha_nadig@infosys.com)
2/15/2006 2:37 AM | Susmitha
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: