Activation Error with Cache Manager and Log Manager block

Jul 21, 2011 at 5:20 AM

Both the logging and caching block throw the same error. I will give the details of the cachemanager error.. everything is same except in place of cache its log

ErrorThrown

Activation error occured while trying to get instance of type ICacheManager, key "

STACK TRACE

    at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line 53
   at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService](String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line 103
   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.InnerGetCacheManager(String cacheManagerName) in C:\Projects\DTG\Global\Microsoft\EntLib\5.0\Blocks\Caching\Src\Caching\CacheFactory.cs:line 66
   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager() in C:\Projects\DTG\Global\Microsoft\EntLib\5.0\Blocks\Caching\Src\Caching\CacheFactory.cs:line 37
   at DTG.Global.Utility.Caching.CacheManager.GetItemFromCache[T](String cacheKey)
   at DTG.Global.ConsumerServices.Business.Support.SupportManager.GetVendorByResSource(String resSource, Brand brand, String requestorID) in C:\Projects\ConsumerService\Consumer Services\Business\Support\SupportManager.cs:line 970

INNER EXCEPTION MESSAGE

Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager,(none)

SOURCE

Microsoft.Practices.ServiceLocation

<?xml version=
"1.0"?>
<configuration> 
<configSections>
 <section name="sitecore" type="Sitecore.Configuration.ConfigReader, Sitecore.Kernel"/> 
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa"/>
 <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa"/> 
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa"/> 
</configSections> 
<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
 <listeners>
 <add source="Enterprise Library Logging" formatter="Text Formatter" log="Application" machineName="." listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" name="Formatted EventLog TraceListener"/> 
<add name="Msmq TraceListener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.MsmqTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.MsmqTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" traceOutputOptions="None" filter="All" queuePath="Formatname:DIRECT=OS:USTLSDTCE001\ConsumerServicesLog" formatter="Binary Formatter" messagePriority="Normal" timeToReachQueue="49710.06:28:15" timeToBeReceived="49710.06:28:15" recoverable="false" useAuthentication="false" useDeadLetterQueue="false" useEncryption="false" transactionType="Single"/> </listeners> <formatters> <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.BinaryLogFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" name="Binary Formatter"/> 
<add template="Timestamp: {timestamp}&#xA;Message: {message}&#xA;Category: {category}&#xA;Priority: {priority}&#xA;EventId: {eventid}&#xA;Severity: {severity}&#xA;Title: {title}&#xA;Brand: {brand}&#xA;Machine: {machine}&#xA;Application Domain: {appDomain}&#xA;Process Id: {processId}&#xA;Process Name: {processName}&#xA;Win32 Thread Id: {win32ThreadId}&#xA;Thread Name: {threadName}&#xA;Extended Properties: {dictionary({key} - {value}&#xA;)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" name="Text Formatter"/>
 </formatters>
 <categorySources>
 <add switchValue="All" name="Audit"> <listeners> <add name="Msmq TraceListener"/> <add name="Formatted EventLog TraceListener"/> </listeners> </add>
 <add switchValue="All" name="Error"> <listeners> <add name="Msmq TraceListener"/> <add name="Formatted EventLog TraceListener"/> </listeners> </add> 
<add switchValue="All" name="General"> <listeners> <add name="Msmq TraceListener"/> <add name="Formatted EventLog TraceListener"/> </listeners> </add>
 <add switchValue="All" name="Information"> <listeners> <add name="Msmq TraceListener"/> <add name="Formatted EventLog TraceListener"/> </listeners> </add>
 <add switchValue="All" name="Trace"> <listeners> <add name="Msmq TraceListener"/> <add name="Formatted EventLog TraceListener"/> </listeners> </add> 
<add switchValue="All" name="Warning"> <listeners> <add name="Msmq TraceListener"/> <add name="Formatted EventLog TraceListener"/> </listeners> </add> 
<add switchValue="All" name="EmailService"> <listeners> <add name="Database Trace Listener" /> <add name="Msmq TraceListener"/> </listeners> </add> 
</categorySources> <specialSources> <allEvents switchValue="All" name="All Events"/> <notProcessed switchValue="All" name="Unprocessed Category"/> 
<errors switchValue="All" name="Logging Errors &amp; Warnings"> <listeners> <add name="Formatted EventLog TraceListener"/> <add name="Msmq TraceListener"/> 
</listeners> </errors> </specialSources> 
</loggingConfiguration>
 <cachingConfiguration defaultCacheManager="Cache Manager"> 
<cacheManagers>
 <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="Null Storage" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" name="Cache Manager"/>
 </cacheManagers>
 <backingStores> 
<add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=0a15f40622f0a9fa" name="Null Storage"

 

/>
		</backingStores>
	</cachingConfiguration>
</configuration>
  
 Any help would be greatly appreciated.
Tanks