我有一些使用appfabric的代碼,並且正在獲取服務器不可用性錯誤。按照http://msdn.microsoft.com/en-us/library/ff921031.aspx的說明,我發現我的緩存集羣已關閉。我以管理員身份打開PowerShell並運行Start-CacheCluster。幾分鐘後,我收到一條錯誤消息:嘗試從powershell啓動appfabric緩存集羣拒絕訪問
Start-CacheCluster : Could not start cluster: ErrorCode<ERRCAdmin025>:SubStatus
<ES0001>:Time-out occurred in starting the cluster.
At line:1 char:19
+ Start-CacheCluster <<<<
+ CategoryInfo : NotSpecified: (:) [Start-CacheCluster], DataCach
eException
+ FullyQualifiedErrorId : ERRCAdmin025,Microsoft.ApplicationServer.Caching
.Commands.StartCacheClusterCommand
檢查事件日誌揭示了這一點:
Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.ApplicationServer.Caching.ConfigManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Fabric.Common.ConsoleSink' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied. (C:\Windows\System32\AppFabric\DistributedCacheService.exe.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBU...
有沒有人有更多的AppFabric經驗見過這個?
-Thanks
授予服務帳戶權限位於\ Program Files文件\的AppFabric 1.1的Windows Server \的DistributedCacheService.exe.config文件做我的詭計。謝謝戴夫! –