I’ve been trying to configure interception for Unity (I want to log to log4net before and after object method calls).
I’ve used this example:
http://www.codeproject.com/KB/architecture/UnityAOPNHibernate.aspx
and its similar to this answer:
but I get “Unrecognized element ‘extensionConfig’.” – on the line where it does GetSection(“unity”) below.
IUnityContainer unityContainer = new UnityContainer();
var configurationSection =
(UnityConfigurationSection)ConfigurationManager.GetSection("unity")
Please help
You need to add a section extention for this to work
Refer page 60 of Unity20.PDF for the documentation