How to create a custom provider in Enterprise Library 5.0?

May 15, 2010 at 3:46 PM

I try to create a custom provider in Enterprise Library 5.0, but while I call following code to get defulat provider, it will throw exception:"The type AuditLogProviderBase cannot be constructed. You must configure the container to supply this value."

AuditLogProviderBase _provider = EnterpriseLibraryContainer.Current.GetInstance<AuditLogProviderBase>();

My original application can work under Enterprise Library 4.1, when I try to upgrade to 5.0. I found some codes about provider's configuration cannot complile in 5.0. I cannot found any documenation about to define configuration for custom provider in Enterprise Library 5.0.


May 17, 2010 at 3:31 AM

The documentation for this can be found in Developing Applications with Enterprise Library -> Extending and Modifying Enterprise Library - > Creating Custom Providers for Enterprise Library section. 

To continue the discussion, please post this in the entlib forum -


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.