title: Enterprise library exception: Activation error occured while trying to get instance of type ICacheManager, key?
body: <p>Using .net 3.5 and Enterprise library 5.0.</p>
  
  <p>From my research, I found a similar issue here:
  <a href="https://stackoverflow.com/questions/6234076/activation-error-occured-while-trying-to-get-instance-of-type-icachemanager-key">Activation error occured while trying to get instance of type ICacheManager, key &quot;Cache Manager&quot;</a> *** this solution did not fix my issue.</p>
  
  <p>I can't seem to figure it out, my config should be set up correctly, but keep getting the exception? Anyone have similar issues?</p>
  
  <p>I made the suggestion to add cacheManager and reference when I call the cache manager:</p>
  
  <pre><code>using Microsoft.Practices.EnterpriseLibrary.Caching;
  using Microsoft.Practices.EnterpriseLibrary.Caching.Expirations;
  .....
  ....
  ICacheManager cm = CacheFactory.GetCacheManager("TrackingCacheManager");
  </code></pre>
  
  <p>The App.config:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;configSections&gt;
          &lt;section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /&gt;
          &lt;section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /&gt;
    &lt;/configSections&gt;
       &lt;cachingConfiguration defaultCacheManager="TrackingCacheManager"&gt;
          &lt;cacheManagers&gt;
              &lt;add name="TrackingCacheManager" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                  expirationPollFrequencyInSeconds="120" maximumElementsInCacheBeforeScavenging="1000"
                  numberToRemoveWhenScavenging="10" backingStoreName="NullBackingStore" /&gt;
          &lt;/cacheManagers&gt;
          &lt;backingStores&gt;
              &lt;add type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                  name="NullBackingStore" /&gt;
          &lt;/backingStores&gt;
      &lt;/cachingConfiguration&gt;
      &lt;dataConfiguration defaultDatabase="ConnectionString" /&gt;
      &lt;connectionStrings&gt;
          &lt;add name="ConnectionString" connectionString="server=AFS7BCBRNGQ5O0\DEVELOPMENT;database=EITC_RTS;Integrated Security=True"
              providerName="System.Data.SqlClient" /&gt;
      &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My references:</p>
  
  <p><img src="https://i.stack.imgur.com/PTalp.png" alt="enter image description here"></p>