title: Windows Server AppFabricCache, Exception, Check the client version
body: <p>I'm trying to build and run <a href="http://www.microsoft.com/en-us/download/details.aspx?id=19603" rel="nofollow">WindowsServerAppFabricSamples</a> CacheAPISample application. I had to install Microsoft.WindowsAzure.Caching version 2.3.1.0 from nuget to build. My config is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere"/&gt;
      &lt;section name="cacheDiagnostics" type="Microsoft.ApplicationServer.Caching.AzureCommon.DiagnosticsConfigurationSection, Microsoft.ApplicationServer.Caching.AzureCommon" allowLocation="true" allowDefinition="Everywhere"/&gt;
    &lt;/configSections&gt;
    &lt;dataCacheClients&gt;
      &lt;dataCacheClient name="default" /&gt;
    &lt;/dataCacheClients&gt;          
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
    &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>When I run the application I get exception with message: </p>
  
  <blockquote>
    <p>Check the client version. It should be within the allowed version
    range on the server. If necessary, upgrade the client to the allowed
    version.</p>
  </blockquote>
  
  <p>Exception trace:</p>
  
  <pre><code>Microsoft.ApplicationServer.Caching.DataCacheException was unhandled
    HelpLink=http://go.microsoft.com/fwlink/?LinkId=164049
    HResult=-2146233088
    Message=ErrorCode&lt;ERRCA0019&gt;:SubStatus&lt;ES0001&gt;:Check the client version. It should be within the allowed version range on the server. If necessary, upgrade the client to the allowed version.
    Source=Microsoft.ApplicationServer.Caching.Client
    ErrorCode=19
    SubStatus=-1
    StackTrace:
         at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ErrStatus errStatus, Guid trackingId, Exception responseException, Byte[][] payload, EndpointID destination)
         at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, EndpointID destination)
         at Microsoft.ApplicationServer.Caching.DataCacheFactory.EstablishConnection(IEnumerable`1 servers, RequestBody request, Func`3 sendMessageDelegate, DataCacheReadyRetryPolicy retryPolicy)
         at Microsoft.ApplicationServer.Caching.WcfClientProtocol.Initialize(IEnumerable`1 servers)
         at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName, CreateNewCacheDelegate cacheCreationDelegate, DataCacheInitializationViaCopyDelegate initializeDelegate)
         at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)
         at CacheAPISample.Program.PrepareClient() in c:\Programming\WindowsServerAppFabricSamples\Samples\CS\Cache\CacheAPISample\CacheAPISample\Program.cs:line 617
         at CacheAPISample.Program.Main(String[] args) in c:\Programming\WindowsServerAppFabricSamples\Samples\CS\Cache\CacheAPISample\CacheAPISample\Program.cs:line 18
         at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
         at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
  </code></pre>
  
  <p>Responsible code part is:</p>
  
  <pre><code>private void PrepareClient()
  {
      List&lt;DataCacheServerEndpoint&gt; servers = new List&lt;DataCacheServerEndpoint&gt;(1);
      servers.Add(new DataCacheServerEndpoint("localhost", 22233));
      DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();
      configuration.Servers = servers;
      configuration.LocalCacheProperties = new DataCacheLocalCacheProperties();
      DataCacheClientLogManager.ChangeLogLevel(System.Diagnostics.TraceLevel.Off);
      myCacheFactory = new DataCacheFactory(configuration);
      // Breaks after this comment.
      myDefaultCache = myCacheFactory.GetCache("default");
  }
  </code></pre>
  
  <p>In administration Windows PowerShell I have run <code>get-cachehost</code> command. Here's what I got:</p>
  
  <pre><code>HostName : CachePort Service Name            Service Status Version Info
  -------------------- ------------            -------------- ------------
  KOKICA:22233         AppFabricCachingService UP             3 [3,3][1,3]
  </code></pre>
  
  <p>Both server and client application are running on the same Windows 8.1 machine. AppFabric 1.1 is installed. Cache dependencies </p>
  
  <p>Microsoft.ApplicationServer.Caching.Client.dll, 
  Microsoft.ApplicationServer.Caching.Core </p>
  
  <p>are in </p>
  
  <p>C:\Program Files\Microsoft SDKs\Windows Azure.NET SDK\v2.2\ref\Caching</p>
  
  <p>File version is 1.0.5137.0. Any attempts to help me resolve this issue will be appreciated.</p>