Caching not working

Nov 12, 2009 at 5:14 PM

I am trying to get Caching work. I am not sure what i did wrong.

Base on documentation, I change the server name base on where the database is. My Cache database in Server1 and my ShareServices1_DB stay in Server2

  <add name="Connection String" connectionString="Data Source=Server1;Initial Catalog=Caching;Integrated Security=True" providerName="System.Data.SqlClient" />

  <add name="SharedServices" connectionString="Data Source=Server2 ;Initial Catalog=SharedServices1_DB;Integrated Security=True" providerName="System.Data.SqlClient" />

I look at event log and see this.

Event Type: Error
Event Source: Faceted Search Logging
Event Category: None
Event ID: 100
Date:  11/12/2009
Time:  11:49:10 AM
User:  N/A
Computer: MyVMMACHine
Description:
Timestamp: 11/12/2009 5:49:10 PM
Message: HandlingInstanceID: 2a50eff1-24ef-409e-8506-40cd8ba08a3a
An exception of type 'Microsoft.Practices.ObjectBuilder2.BuildFailedException' occurred and was caught.
-------------------------------------------------------------------------------------------------------
11/12/2009 11:49:10
Type : Microsoft.Practices.ObjectBuilder2.BuildFailedException, Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Message : The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, Cache Manager]) failed: Cannot open log for source 'Enterprise Library Data'. You may not have write access. (Strategy type ConfiguredObjectStrategy, index 2)
Source : Microsoft.Practices.ObjectBuilder2
Help link :
ExecutingStrategyTypeName : ConfiguredObjectStrategy
ExecutingStrategyIndex : 2
BuildKey : Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, Cache Manager]
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Object ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext)
Stack Trace :    at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
   at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp(IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing)
   at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp[TTypeToBuild](IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing)
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, IConfigurationSource configurationSource)
   at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.CreateDefault()
   at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager()
   at Microsoft.SharePoint.Portal.ExtendedSearch.WebControls.SearchProcessor.GetCachedData(String selectColumns, Int16 resultsPerPage, Int32 longCacheTimeout, Int32 fastCacheTimeout, Boolean& usingCachedData, Boolean& run2ndTime)

Additional Info:

MachineName : MyVMMACHine
TimeStamp : 11/12/2009 5:49:10 PM
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : /LM/W3SVC/1947957315/Root-3-129025206557202841
ThreadIdentity : domain\user
WindowsIdentity : domain\user
 Inner Exception
 ---------------
 Type : System.InvalidOperationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 Message : Cannot open log for source 'Enterprise Library Data'. You may not have write access.
 Source : System
 Help link :
 Data : System.Collections.ListDictionaryInternal
 TargetSite : Void OpenForWrite(System.String)
 Stack Trace :    at System.Diagnostics.EventLog.OpenForWrite(String currentMachineName)
    at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
    at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
    at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
    at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type)
    at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationListener.ConnectionFailed(Object sender, ConnectionFailedEventArgs e)
    at Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationProvider.FireConnectionFailedEvent(String connectionString, Exception exception)
    at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection()
    at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection(Boolean disposeInnerConnection)
    at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)
    at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName)
    at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command)
    at Microsoft.Practices.EnterpriseLibrary.Caching.Database.DataBackingStore.LoadDataFromStore()
    at Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.BaseBackingStore.Load()
    at Microsoft.Practices.EnterpriseLibrary.Caching.Cache..ctor(IBackingStore backingStore, CacheCapacityScavengingPolicy scavengingPolicy, CachingInstrumentationProvider instrumentationProvider)
    at Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerFactoryHelper.BuildCacheManager(String cacheManagerName, IBackingStore backingStore, Int32 maximumElementsInCacheBeforeScavenging, Int32 numberToRemoveWhenScavenging, Int32 expirationPollFrequencyInSeconds, CachingInstrumentationProvider instrumentationProvider)
    at Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerAssembler.Assemble(IBuilderContext context, CacheManagerDataBase objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedObjectFactory`2.Create(IBuilderContext context, TConfiguration objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
    at Microsoft.Practices.EnterpriseLibrary.Caching.CacheManagerCustomFactory.Create(IBuilderContext context, CacheManagerDataBase objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory`2.Create(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory`2.CreateObject(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
    at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.PreBuildUp(IBuilderContext context)
    at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)

  Inner Exception
  ---------------
  Type : System.ComponentModel.Win32Exception, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  Message : Access is denied
  Source :
  Help link :
  NativeErrorCode : 5
  ErrorCode : -2147467259
  Data : System.Collections.ListDictionaryInternal
  TargetSite :
  Stack Trace : The stack trace is unavailable.

Category: General
Priority: 0
EventId: 100
Severity: Error
Title:Enterprise Library Exception Handling
Machine: MyVMMACHine
Application Domain: /LM/W3SVC/1947957315/Root-3-129025206557202841
Process Id: 19532
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Win32 Thread Id: 16640
Thread Name:
Extended Properties:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Coordinator
Nov 12, 2009 at 5:40 PM

The one-click doesn't require SQL connection string sin web.config

Nov 12, 2009 at 10:49 PM
Edited Nov 12, 2009 at 10:50 PM

leonidly, what do you mean? I already installed Faceted Search without any error during installation ,but i get error on the log as above when doing a search. Caching is not working and that what i am trying to resolve.

Coordinator
Nov 13, 2009 at 12:13 AM
Edited Nov 13, 2009 at 12:13 AM

Documentation is obsolete. Lines below are not required nor needed.

<add name="Connection String" connectionString="Data Source=Server1;Initial Catalog=Caching;Integrated Security=True" providerName="System.Data.SqlClient" />

  <add name="SharedServices" connectionString="Data Source=Server2 ;Initial Catalog=SharedServices1_DB;Integrated Security=True" providerName="System.Data.SqlClient" />

Nov 13, 2009 at 8:50 PM
Edited Nov 13, 2009 at 8:51 PM

Leonidly, Thanks for response. So there no need to create a Caching database? I also can't seem to get the search hint, autocomplete textbox or search bread crumbs to work? I don't know where to start to trouble shoot these issue.

Coordinator
Nov 13, 2009 at 9:27 PM

Correct. SQL dbs are not needed. Are you working with the latest build?

Leonid

Nov 17, 2009 at 12:58 PM

Ok, the documentation is obsolete and we can download a one-click-installation. Now, it´s correct, that we don´t need the enterprise library 4.1?

Best regars

mrosch

Coordinator
Nov 17, 2009 at 4:04 PM

EntLib 4.1 dlls will get installed during the installation of FS3.0