AppFabric的缓存 - 一个现有的连接被强行关闭远程主机缓存、主机、AppFabric

由网友(有一种爱叫我一直在)分享简介:我想获得的AppFabric缓存起来,在我的本地开发环境中运行。我的的Windows Server AppFabric的Beta 2的刷新安装,并且缓存集群和主机配置,并开始在Windows 7 64位运行。我跑下整合模式4.0版的应用程序池在本地IIS网站我的MVC2的网站。主机名:CachePort服务名称服务状态...

我想获得的AppFabric缓存起来,在我的本地开发环境中运行。我的的Windows Server AppFabric的Beta 2的刷新安装,并且缓存集群和主机配置,并开始在Windows 7 64位运行。我跑下整合模式4.0版的应用程序池在本地IIS网站我的MVC2的网站。

 主机名:CachePort服务名称服务状态版本信息
-------------------- ------------ -------------- ---- --------
SN-3TQHQL1:22233 AppFabricCachingService 1 [1,1] [1,1]
 

我配置了以下我的web.config:

 < configSections>
        <节名称=dataCacheClientTYPE =Microsoft.ApplicationServer.Caching.DataCacheClientSection,Microsoft.ApplicationServer.Caching.Core,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35allowLocation =真正的allowDefinition的=无处不在/>
   < / configSections>

   < dataCacheClient>
       <主机>
           <主机名=SN-3TQHQL1cachePort =22233/>
       < /主机>
   < / dataCacheClient>
 

我发现了一个错误,当我尝试初始化DataCacheFactory:

 保护CacheService()
    {
        _cacheFactory =新DataCacheFactory(); <  - 在这里错误
        _defaultCache = _cacheFactory.GetDefaultCache();
    }
 
svn 远程主机强迫关闭了一个现有的连接

我收到了ASP.NET黄色错误屏幕为以下内容:

一个现有的连接被强行关闭远程主机

说明:当前Web请求的执行过程中发生未处理的异常。请查看有关错误的详细堆栈跟踪信息,以及它起源于code。

异常详细信息:System.Net.Sockets.SocketException:一个现有的连接被强行关闭远程主机

源错误:

 第21行:保护CacheService()
第22行:{
第23行:_cacheFactory =新DataCacheFactory();
第24行:_defaultCache = _cacheFactory.GetDefaultCache();
第25行:}
 

解决方案

我有一个类似的问题还有,我的问题是我没有给适当的权限缓存客户端。为了快速验证这样的问题,我会给予缓存中的每一个人帐户的访问。如果这解决了问题,然后考虑限制访问到相应的帐户,而不是每一个人。这样做可以通过高速缓存管理器的Windows PowerShell,这是在将Windows Server AppFabric的开始菜单文件夹中找到执行以下命令:

 资助-CacheAllowedClientAccount大家
 

I'm trying to get AppFabric cache up and running on my local development environment. I have Windows Server AppFabric Beta 2 Refresh installed, and the cache cluster and host configured and started running on Windows 7 64-bit. I'm running my MVC2 website in a local IIS website under a v4.0 app pool in integrated mode.

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

I have my web.config configured with the following:

  <configSections>
        <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/>
   </configSections>

   <dataCacheClient>
       <hosts>
           <host name="SN-3TQHQL1" cachePort="22233" />
       </hosts>
   </dataCacheClient>

I'm getting an error when I attempt to initialize the DataCacheFactory:

    protected CacheService()
    {
        _cacheFactory = new DataCacheFactory(); <-- Error here
        _defaultCache = _cacheFactory.GetDefaultCache();
    }

I'm getting the ASP.NET yellow error screen with the following:

An existing connection was forcibly closed by the remote host

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Source Error:

Line 21:         protected CacheService()
Line 22:         {
Line 23:             _cacheFactory = new DataCacheFactory();
Line 24:             _defaultCache = _cacheFactory.GetDefaultCache();
Line 25:         }

解决方案

I had a similar issue as well, and my problem was I had not given the proper permissions to the cache client. In order to quickly verify this is the issue I would grant the everyone account access to the cache. If this fixes the issue then look into limiting access to the appropriate account rather than everyone. This can done executing the following command via the "Caching Administrator Windows PowerShell", which is found in the Windows Server AppFabric start menu folder:

Grant-CacheAllowedClientAccount everyone

阅读全文

相关推荐

最新文章