Enterprise Library CacheFactory.GetCacheManager Throws Null Ref

Question :

Enterprise Library CacheFactory.GetCacheManager Throws Null Ref,

Answer :

I’m trying to convert an application using the 1.1 version of the Enterprise Library Caching block over to the 2.0 version. I think where I’m really having a problem is that the configuration for the different EntLib pieces was split out over several files. Apparently, this used to be handled by the ConfigurationManagerSectionHandler, but is now obsolete in favor of the built-in configuration mechanisms in .NET 2.0.

I’m having a hard time finding a good example of how to do this configuration file splitting, especially in the context of EntLib. Has anyone else dealt with this?

Read More  Is it possible to slipstream the Visual Studio 2008 SP1 install?


Looks like it was the configuration. I found a good example of the normal, one-file approach here:

Using an external config file is actually trivial once you figure out the syntax for it. Ex.:

In Web.config:


In cachingconfiguration.config:


Hopefully this helps somebody!

That’s the answer Enterprise Library CacheFactory.GetCacheManager Throws Null Ref, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you