Config Error

Topics: User Forum
May 26, 2009 at 11:03 AM

Hi, Im new to SharedCache so this may be a simple problem but I can't get the config to work.  I keep getting an exception when calling IndexusDistributionCache.SharedCache.Get<string>(key); with the following configuration in my web app.  The exception says;

Parser Error Message: Unrecognized element 'clientSetting'.

<configSections>

<section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Server.IndexusServerProviderSection, SharedCache.WinServiceCommon"/>

</configSections>

<indexusNetSharedCache defaultProvider="IndexusSharedCacheProvider">
    <clientSetting
                SharedCacheVersionNumber="3.0.5.1"
                LoggingEnable="0"
                CompressionEnabled="0"
                CompressionMinSize="1024000"
                HashingAlgorithm="Hashing"
                SocketPoolMinAvailableSize="5"
                SocketPoolValidationInterval="00:02:00"
                SocketPoolTimeout="00:02:00" />
    <servers>
      <add key="localhost"    ipaddress="127.0.0.1" port="48888"/>
    </servers>
    <providers>
      <add name="IndexusSharedCacheProvider"
                   type="SharedCache.WinServiceCommon.Provider.Cache.IndexusSharedCacheProvider, SharedCache.WinServiceCommon">
      </add>
    </providers>
  </indexusNetSharedCache>

May 26, 2009 at 11:19 AM

Clearly I've been a plonker!  The problem is entirely my fault and lies here

<section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Server.IndexusServerProviderSection, SharedCache.WinServiceCommon"/>

should be

<section name="indexusNetSharedCache" type="SharedCache.WinServiceCommon.Configuration.Client.IndexusServerProviderSection, SharedCache.WinServiceCommon"/>