Windows Server AppFabricCache,异常,检查客户端版本 [英] Windows Server AppFabricCache, Exception, Check the client version

查看:56
本文介绍了Windows Server AppFabricCache,异常,检查客户端版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建和运行 WindowsServerAppFabricSamples CacheAPISample应用程序.我必须从nuget安装Microsoft.WindowsAzure.Caching版本2.3.1.0进行构建.我的配置是:

I'm trying to build and run WindowsServerAppFabricSamples CacheAPISample application. I had to install Microsoft.WindowsAzure.Caching version 2.3.1.0 from nuget to build. My config is:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere"/>
    <section name="cacheDiagnostics" type="Microsoft.ApplicationServer.Caching.AzureCommon.DiagnosticsConfigurationSection, Microsoft.ApplicationServer.Caching.AzureCommon" allowLocation="true" allowDefinition="Everywhere"/>
  </configSections>
  <dataCacheClients>
    <dataCacheClient name="default" />
  </dataCacheClients>          
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>

运行应用程序时,出现异常消息:

When I run the application I get exception with message:

检查客户端版本.它应该在允许的版本内服务器上的范围.如有必要,将客户端升级到允许的范围.版本.

Check the client version. It should be within the allowed version range on the server. If necessary, upgrade the client to the allowed version.

异常跟踪:

Microsoft.ApplicationServer.Caching.DataCacheException was unhandled
  HelpLink=http://go.microsoft.com/fwlink/?LinkId=164049
  HResult=-2146233088
  Message=ErrorCode<ERRCA0019>:SubStatus<ES0001>: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()

负责的代码部分是:

private void PrepareClient()
{
    List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>(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");
}

在管理Windows PowerShell中,我已运行 get-cachehost 命令.这就是我得到的:

In administration Windows PowerShell I have run get-cachehost command. Here's what I got:

HostName : CachePort Service Name            Service Status Version Info
-------------------- ------------            -------------- ------------
KOKICA:22233         AppFabricCachingService UP             3 [3,3][1,3]

服务器和客户端应用程序都在同一台Windows 8.1计算机上运行.AppFabric 1.1已安装.缓存依赖项

Both server and client application are running on the same Windows 8.1 machine. AppFabric 1.1 is installed. Cache dependencies

Microsoft.ApplicationServer.Caching.Client.dll,Microsoft.ApplicationServer.Caching.Core

Microsoft.ApplicationServer.Caching.Client.dll, Microsoft.ApplicationServer.Caching.Core

C:\ Program Files \ Microsoft SDKs \ Windows Azure.NET SDK \ v2.2 \ ref \ Caching

C:\Program Files\Microsoft SDKs\Windows Azure.NET SDK\v2.2\ref\Caching

文件版本为1.0.5137.0.任何帮助我解决此问题的尝试将不胜感激.

File version is 1.0.5137.0. Any attempts to help me resolve this issue will be appreciated.

推荐答案

您引用的库用于Azure缓存,而您正在寻找的是用于Windows Server的onPremise Appfabric的客户端库.

The libraries you referred are for Azure Cache, whereas what you are looking for is client libraries for onPremise Appfabric for windows server.

如果您从此处安装了适用于Windows服务器的Microsoft Appfabric 1.1: http://www.microsoft.com/zh-cn/download/details.aspx?id=27115 ,您需要右键单击客户端项目属性,然后从c:\ Program Files \ Windows Server Appfabric或安装的任何文件夹中引用客户端dll(Microsoft.ApplicationServer.Caching.Client.dll和Microsoft.ApplicationServer.Caching.Core.dll.)它来.(在安装时,您应该选中安装客户端"复选框

If you have installed Microsoft Appfabric 1.1 for windows server from here:http://www.microsoft.com/en-us/download/details.aspx?id=27115, You need to right click your client project properties and refer client dlls(Microsoft.ApplicationServer.Caching.Client.dll and Microsoft.ApplicationServer.Caching.Core.dll.) from c:\Program Files\Windows Server Appfabric or whichever folder you installed it to. (While installing, you should have checked the check box 'install client'

请参阅此链接以获取更多详细信息: http://msdn.microsoft.com/zh-我们/library/hh334398(v=azure.10).aspx

Refer this link for more details: http://msdn.microsoft.com/en-us/library/hh334398(v=azure.10).aspx

这篇关于Windows Server AppFabricCache,异常,检查客户端版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆