Wal*_*eza 7 .net appfabric appfabric-beta-2
我正在尝试在我的本地开发环境中启动并运行AppFabric缓存.我安装了Windows Server AppFabric Beta 2 Refresh,并在Windows 7 64位上配置并开始运行缓存集群和主机.我在集成模式下在v4.0应用程序池下的本地IIS网站上运行我的MVC2网站.
HostName : CachePort Service Name Service Status Version Info
-------------------- ------------ -------------- ------------
SN-3TQHQL1:22233 AppFabricCachingService UP 1 [1,1][1,1]
Run Code Online (Sandbox Code Playgroud)
我的web.config配置了以下内容:
<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>
Run Code Online (Sandbox Code Playgroud)
我尝试初始化DataCacheFactory时遇到错误:
protected CacheService()
{
_cacheFactory = new DataCacheFactory(); <-- Error here
_defaultCache = _cacheFactory.GetDefaultCache();
}
Run Code Online (Sandbox Code Playgroud)
我正在使用以下内容获取ASP.NET黄色错误屏幕:
远程主机强制关闭现有连接
描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.
异常详细信息:System.Net.Sockets.SocketException:远程主机强制关闭现有连接
来源错误:
Line 21: protected CacheService()
Line 22: {
Line 23: _cacheFactory = new DataCacheFactory();
Line 24: _defaultCache = _cacheFactory.GetDefaultCache();
Line 25: }
Run Code Online (Sandbox Code Playgroud)
Ble*_*ger 14
我也有类似的问题,我的问题是我没有给缓存客户端提供适当的权限.为了快速验证这是问题,我会授予每个人帐户访问缓存的权限.如果这可以解决问题,那么请考虑限制对相应帐户的访问,而不是每个人.这可以通过"缓存管理器Windows PowerShell"执行以下命令,该命令位于Windows Server AppFabric开始菜单文件夹中:
Grant-CacheAllowedClientAccount everyone
Run Code Online (Sandbox Code Playgroud)