新しい「管理者」アカウントで Windows Server 2008 R2 マシン上の IsolatedStorage (GetMachineStoreForAssembly) にアクセスしようとしている .NET 4 アプリケーションで興味深い問題が発生しました。この同じマシン上の他のユーザーは、問題なくアクセスできます。アプリケーションがこの新しいアカウントで初めて実行され、IsolatedStorage にアクセスしようとすると、失敗します。
System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope, StringHandleOnStack retRootDir)
at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsMachine(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 applicationEvidenceType)
Windows エクスプローラー、つまり C:\ProgramData 経由で IsolatedStorage ファイルを参照しようとしました... ProgramData をクリックするとすぐに、次のプロンプトが表示されました。
You don't currently have permission to access this folder. Click Continue to permanently get access to this folder.
[続行] をクリックするとすぐに、アプリケーションは問題なく IsolatedStorage を読み書きできるようになりました。
誰でもこの動作を説明できますか? IsolatedStorage にアクセスできるようにするために、新しいユーザーに割り当てる必要がある特定のアクセス許可はありますか?
ありがとう!