我面临的情况是我有一个在 W2k3 服务器上运行的 ASP.NET Web 服务 (.NET 3.5),该服务器使用 CacheManager/IsolatedStorage 存储来存储持久状态变量。在我们更改物理机器之前,此配置已经运行了很长一段时间。现在,每当访问该值的代码运行时,它都会抛出一个 IsolatedStorageException(发布在下面)。据我了解,用户/程序集存储是正在访问的内容,执行用户是本地管理员组的成员。有没有人建议缺少什么特权?
错误
无法创建存储目录。(来自 HRESULT 的异常:0x80131468)
堆栈跟踪
类型:Microsoft.Practices.ObjectBuilder2.BuildFailedException。错误:当前构建操作(构建密钥 Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, Cache Manager])失败:无法创建存储目录。(HRESULT 异常:0x80131468)(策略类型 ConfiguredObjectStrategy,索引 2)。跟踪:在 Microsoft.Practices.ObjectBuilder2.Builder.BuildUp(IReadWriteLocator 定位器,ILifetimeContainer 生命周期,IPolicyList 策略,IStrategyChain 策略,对象 buildKey,现有对象)在 Microsoft.Practices 的 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)。微软的 ObjectBuilder2.Builder.BuildUp[TTypeToBuild](IReadWriteLocator 定位器、ILifetimeContainer 生命周期、IPolicyList 策略、IStrategyChain 策略、Object buildKey、Object existing)。1.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.Command
2.在 c:\Projects\EPT\Ept.Framework.Services\Commands\Command.cs:line 79 中执行(TRequest 请求)。ExecutingStrategyTypeName:ConfiguredObjectStrategy ExecutingStrategyIndex:2 BuildKey:Build Key[Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager , 缓存管理器] 类型:System.IO.IsolatedStorage.IsolatedStorageException。错误:无法创建存储目录。(来自 HRESULT 的异常:0x80131468)。追踪:在 System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope 范围) 在 System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope 范围) 在 System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope 范围) 在 System.IO.IsolatedStorage System.IO.IsolatedStorage 中的 .IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope 范围)。2.Create(IBuilderContext context, TConfiguration objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory
2. 在 Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerAssembler.Assemble(IBuilderContext context, CacheManagerDataBase objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache) 在 Microsoft.Practices.EnterpriseLibrary 中创建(IBuilderContext context, String name, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)。 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.AssemblerBasedCustomFactory
2.在 Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory 中创建(IBuilderContext 上下文,字符串名称,IConfigurationSource 配置源,ConfigurationReflectionCache 反射缓存)`2.在 Microsoft 中创建对象(IBuilderContext 上下文,字符串名称,IConfigurationSource 配置源,ConfigurationReflectionCache 反射缓存)。 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) 中的 Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.PreBuildUp(IBuilderContext context)。