A Cause for HRESULT 0X80131468 when accessing IsolatedStorageBackingStore

4

The scenario I am facing is that I have an ASP.NET web service (.NET 3.5) running on an W2k3 server which is using the CacheManager/IsolatedStorage store to store a persisted state variable. This configuration has been working fine for quite sometime until we changed the physical machine. Now whenver the code that accesses that value runs it throws an IsolatedStorageException (Posted below). As I understand it the user/assembly store is what is being accessed and the executing user is a member of the local administrators group. Does anyone have a suggestion as to what privilege is missing?

Error

Unable to create the store directory. (Exception from HRESULT: 0x80131468)

Stack Trace

Type: Microsoft.Practices.ObjectBuilder2.BuildFailedException. Error: The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, Cache Manager]) failed: Unable to create the store directory. (Exception from HRESULT: 0x80131468) (Strategy type ConfiguredObjectStrategy, index 2). Trace: at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp(IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing) at Microsoft.Practices.ObjectBuilder2.Builder.BuildUp[TTypeToBuild](IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, ILifetimeContainer lifetimeContainer, IConfigurationSource configurationSource) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase1.CreateDefault() at Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager() at Ept.Commands.SettlementCommand.BeginSettlement() in c:\Projects\EPT\Ept.Framework.Services\Commands\SettlementCommand.cs:line 102 at Ept.Commands.SettlementCommand.ExecuteKernel(SettlementRequest request) in c:\Projects\EPT\Ept.Framework.Services\Commands\SettlementCommand.cs:line 188 at Ept.Command2.Execute(TRequest request) in c:\Projects\EPT\Ept.Framework.Services\Commands\Command.cs:line 79. ExecutingStrategyTypeName: ConfiguredObjectStrategy ExecutingStrategyIndex: 2 BuildKey: Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, Cache Manager] Type: System.IO.IsolatedStorage.IsolatedStorageException. Error: Unable to create the store directory. (Exception from HRESULT: 0x80131468). Trace: at System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType) at Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.IsolatedStorageBackingStore.Initialize() at Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.IsolatedStorageBackingStore..ctor(String storageAreaName, IStorageEncryptionProvider encryptionProvider) at Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.IsolatedStorageBackingStoreAssembler.Assemble(IBuilderContext context, CacheStorageData objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedObjectFactory2.Create(IBuilderContext context, TConfiguration objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory2.Create(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerAssembler.Assemble(IBuilderContext context, CacheManagerDataBase objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedObjectFactory2.Create(IBuilderContext context, TConfiguration objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Caching.CacheManagerCustomFactory.Create(IBuilderContext context, CacheManagerDataBase objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory2.Create(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory`2.CreateObject(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.PreBuildUp(IBuilderContext context) at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context).

c#
isolatedstorage
enterprise-library
asked on Stack Overflow Jul 13, 2010 by Tedford • edited Jul 26, 2010 by Tedford

4 Answers

7

The root cause of the issue is that the account which the web service was running under did not have a local user profile created thus the user assembly store didn't exist. The simple fix was just to logon to the box with the service account.

answered on Stack Overflow Jul 14, 2010 by Tedford
2

If you are using Windows 2012 R2 and IIS 8.5, in the case your App is running on a specific Application Pool under its own identity, you need to check that the option "Load user Profile" in the Pool Advanced Parameters is set to True. By doing so, Windows will create a folder having App Pool Identity name under C:\Users and allow your app to write inside the local storage.

answered on Stack Overflow Feb 28, 2016 by Sébastien
1

I had this issue but creating "C:\Documents and Settings\Default User\Local Settings\Application Data\IsolatedStorage" did not resolve the problem because at some point there was a profile name change. The actual location for this server was "C:\Documents and Settings\Default User.WINDOWS\Local Settings\Application Data\IsolatedStorage".

If that does not work, I used Process Monitor with a filter for "IsolatedStorage" to find the correct path for the access denied error.

answered on Stack Overflow Jun 5, 2012 by Craig Barber • edited Jun 5, 2012 by robert
0

On Windows 10 IIS Application Pool setting "Load User Profile" is True by default. But on Windows 2012 is False. Switching to True solved my issue.

answered on Stack Overflow Oct 4, 2017 by Master

User contributions licensed under CC BY-SA 3.0