my app config looks like
<?xml version="1.0" encoding="utf-8" ?>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration"/>
<type type="Platform.Utility.Logging.ILoggingTools, Platform.Utilities"
lifetime="Singleton" name="Logger" />
When I attempt to:
object sectionObj = ConfigurationManager.GetSection("unity");
var section = (UnityConfigurationSection) sectionObj;
I get the following exception:
System.Configuration.ConfigurationErrorsException: Unrecognized element 'type'
There is one thing wrong I can see right off the bat - lifetime is a nested element, not an attribute. Nothing else obviously jumps out. Does the error message give you a line number in the config file for the error?
Thanks for the response. Yea, I discovered that too. The problem with the unrecognized element error was a problem in a configuration of a different container (other than the one I posted). I had forgotten my <types> section around
the type declarations.
Its usually the small stuff that gets me <g>