Error starting up appfabric service on new 64 bit windows 7 machine
-
Wednesday, February 08, 2012 11:33 PM
AppFabric is running on great on some other machines with different OS's. I just tried installing it on a new 64 bit windows 7 machine and it will not startup without an exception. Here is the log output:
AppFabric Caching service crashed with exception {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_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName)
at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions)
at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName)
at System.Configuration.ClientConfigurationHost.OpenStreamForRead(String streamName)
at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Microsoft.Fabric.Common.ConfigFile.get_Config()
at Microsoft.Fabric.Common.ConsoleSink.GetColorMapping()
at Microsoft.Fabric.Common.ConsoleSink..cctor()
--- End of inner exception stack trace ---
at Microsoft.Fabric.Common.ConsoleSink..ctor()
at Microsoft.ApplicationServer.Caching.ConfigManager..cctor()
--- End of inner exception stack trace ---
at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager..ctor()
at Microsoft.ApplicationServer.Caching.ServiceLayer..ctor()
at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartService(Boolean deleteTKT)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)}. Check debug log for more information
Ian Ippolito
All Replies
-
Thursday, February 09, 2012 2:16 AM
I have some more information. I'm assuming I should be looking at the "network service" account? If so, it does not have any permissions on the c:\windows directory. I could give it there to see if it would solve the problem, but am wondering if this would introduce a security issue...
Ian
-
Thursday, February 09, 2012 10:31 AM
Did you configure through configuration wizard or powershell script?
In case you used powershell cmdlets, Add-CacheHost needs to be passed the service account as mentioned here:
http://msdn.microsoft.com/en-us/library/ff631075(v=WS.10).aspx -
Parameters
-Account<String>
The Windows account name that is used to run the Caching Service. This is a local account for non-production workgroup scenarios. For domain configurations, you can only use "NT Authority\Network Service". Note that this parameter is required in both scenarios.

