我试图使用 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完全访问
- 目录的安全权限,每个人的完全访问权限。
有没有办法更深入地调试此错误消息或修复它的解决方案?
<?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>