4

我试图使用 MVC asp.net 项目让 Appfabric 缓存与 IIS7 一起运行。在共享目录中使用 XML 配置提供程序。

使用 cassini 网络服务器(我的本地管理员帐户)时,我可以访问 AppFabric 缓存。

使用 IIS(“ApplicationPoolIdentity”)时,我无法让它工作,并且收到标准消息,它无法连接到主机。

我试图向不同的用户(APPPOOL\name、NETWORKservice、Everyone 等)授予对缓存的访问权限,但我每次都得到这个空异常。

PS C:> Grant-CacheAllowedClientAccount "每个人"

Grant-CacheAllowedClientAccount :对象引用未设置为对象的实例。在 line:1 char:32 + Grant-CacheAllowedClientAccount <<<< Everyone + CategoryInfo : NotSpecified: (:) [Grant-CacheAllowedClientAccount], NullReferenceException + FullyQualifiedErrorId :
System.NullReferenceException,Microsoft.Applicat ionServer.Caching.Commands.GrantCacheAllowedClientAccountCommand

我有两台几乎相同的开发人员机器,使用 win7 x64(连接域),两台计算机上的错误相同。

但是在我的家用计算机(未连接域)上,它使用相同的安装设置、相同的共享目录按预期工作。

到目前为止我做了什么:

  • 两次重新安装appfabric缓存
  • 重新配置缓存以使用另一个目录
  • 设置配置目录共享,Everyone完全访问
  • 目录的安全权限,每个人的完全访问权限。

有没有办法更深入地调试此错误消息或修复它的解决方案?

来自 appfabric 缓存 powershell 的错误

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <configSections>
   <section name="dataCache"     
     type="Microsoft.ApplicationServer.Caching.DataCacheSection,
     Microsoft.ApplicationServer.Caching.Core" />
</configSections>
<dataCache size="Small">
 <caches>
   <cache consistency="StrongConsistency" name="default" minSecondaries="0">
     <policy>
       <eviction type="Lru" />
       <expiration defaultTTL="10" isExpirable="true" />
   </policy>
  </cache>
 </caches>
 <hosts>
   <host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
     hostId="1556989554" size="3003" leadHost="true" account="DOM\vitcpu7$"
     cacheHostName="AppFabricCachingService" name="vitcpu7.office.domain.se"
     cachePort="22233" />
</hosts>
<deploymentSettings>
  <deploymentMode value="RoutingClient" />
</deploymentSettings>
</dataCache>
</configuration>
4

3 回答 3

10

这是因为它是在域环境中设置的,并且“远程注册表”服务没有启动。由于我的家庭计算机在工作组中,因此不需要“远程注册表”启动它的组合,AppFabric 缓存需要这个来在 powershell 中进行大多数更改。

更多信息,请访问 msdn 社交

于 2012-04-05T07:06:48.120 回答
1

同意 Kiteloop,需要启动“远程注册表”并以管理员身份运行“缓存管理 Powershell Windows”。

于 2013-06-04T11:39:13.147 回答
0

对于内置帐户,只需使用这种格式的命令

Grant-CacheAllowedClientAccount -Account "DOMAIN1\Server1$"

更多在这个 MSDN 链接http://msdn.microsoft.com/en-us/library/ff921012.aspx

于 2014-07-21T06:56:49.860 回答