How to get it to work?

Topics: Developer Forum, Project Management Forum, User Forum
Nov 4, 2009 at 9:46 AM

Hi,

I've just install the version 3.0.5.1 in my window xp running asp.net 3.5. However I can't find any documentation regarding how use it.... Is Shared Cache compatible with asp.net 3.5? I modify a simple application but my code failed whenever I try to assign an object to the shared cache... Can anyone help me???? My head is exploding here..... Is there anything I have to do to set up the SharedCache besides double-clicking on the installer exe?BTW, below are my web.config for my sample application.

 

<?xml version="1.0"?>
<configuration>
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
    <section name="replicatedSharedCache" type="SharedCache.WinServiceCommon.Configuration.Server.IndexusServerProviderSection, SharedCache.WinServiceCommon" />
  </configSections>
  <appSettings>
    <add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>
  <replicatedSharedCache defaultProvider="ServerSharedCacheProvider">
    <serverSetting
            ServiceCacheIpAddress="127.0.0.1"
            ServiceCacheIpPort="48888"
            SharedCacheVersionNumber="3.0.5.1"
            LoggingEnable="1"
            ServiceFamilyMode="1"
            CacheAmountOfObjects="-1"
            CacheAmountFillFactorInPercentage="90"
            ServiceCacheCleanup="LRU"
            ServiceCacheCleanupThreadJob="3600000"
            TcpServerMaxThreadToSet="-1"
            TcpServerMinThreadToSet="-1"
            SocketPoolMinAvailableSize="5"
            SocketPoolValidationInterval="00:02:00"
            SocketPoolTimeout="00:02:00"
            />
    <!--
            SocketPoolMinAvailableSize="5"
            SocketPoolValidationInterval="00:02:00"
            SocketPoolTimeout="00:02:00"
        -->
    <replicatedServers>
      <add key="SrvZh02" ipaddress="127.0.0.1" port="48888" />
      <!-- DO NOT DEFINE THE INSTANCE ITSELF !!! IT WILL BE AUTOMATICALLY REMOVED AT RUNTIME -->
    </replicatedServers>
    <providers>
      <add name="ServerSharedCacheProvider" type="SharedCache.WinServiceCommon.Provider.Server.IndexusServerSharedCacheProvider, SharedCache.WinServiceCommon">
      </add>
    </providers>
  </replicatedSharedCache>
  <nlog autoReload="true" throwExceptions="true">
    <targets async="true">
      <target name="shared_cache_general" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_general_log.txt" />
      <target name="shared_cache_traffic" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_traffic_log.txt" />
      <target name="shared_cache_tracking" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_tracking_log.txt" />
      <target name="shared_cache_sync" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_sync_log.txt" />
      <target name="shared_cache_memory" type="File" layout="${longdate}|${level:uppercase=true}|${aspnet-request:item=logSession}|${message}" filename="C:\temp\logs\server\${date:format=yyyy-MM-dd}_shared_cache_memory_log.txt" />
    </targets>
    <rules>
      <logger name="General" minlevel="Debug" writeTo="shared_cache_general" final="true" />
      <logger name="Traffic" minlevel="Debug" writeTo="shared_cache_traffic" final="true" />
      <logger name="Tracking" minlevel="Debug" writeTo="shared_cache_tracking" final="true" />
      <logger name="Sync" minlevel="Debug" writeTo="shared_cache_sync" final="true" />
      <logger name="Memory" minlevel="Debug" writeTo="shared_cache_memory" final="true" />
      <logger name="*" minlevel="Debug" writeTo="shared_cache_general" />
      <logger name="*" minlevel="Info" writeTo="shared_cache_general" />
    </rules>
  </nlog>

.......

Nov 11, 2009 at 4:11 PM

What error are you getting ?

SharedCache works with FrameWork 3.5.

Make sure that you don't have anything blocking the port sharedcache service is listening on (default is 48888), also you can try out the test app (in the folder where the app was installed) to make sure the service is running.