こんにちは私は隔離されたスペースにいくつかの隠された情報を保存する必要があります。そのために私はSystem.IO.Isolatedクラスを次のように使用しています
IsolatedStorageFile isf = System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null);
Stream writer = new IsolatedStorageFileStream(filename, FileMode.Create, isf);
IFormatter formatter = new BinaryFormatter();
formatter.Serialize(writer, appCollection.ToString());
writer.Close();
Windows XPでは正常に動作しますが、Windows2003である本番サーバーでは例外が表示されます
System.IO.IsolatedStorage.IsolatedStorageException:ストアディレクトリを作成できません。
asp.netプロジェクトフォルダーにEveryoneフルコントロールのアクセス許可があります。注意CSoft.Coreは、私が作成した個人用フレームワークです。
これは私のスタックトレースです:
[IsolatedStorageException:ストアディレクトリを作成できません。(HRESULTからの例外:0x80131468)]
System.IO.IsolatedStorage.IsolatedStorageFile.nGetRootDir(IsolatedStorageScopeスコープ)+0
System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScopeスコープ)+97
System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir )+137
System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScopeスコープ)+213
System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScopeスコープ)+56
System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScopeスコープ、タイプdomainEvidenceType、タイプassemblyEvidenceType)+59
C:\ Projectos \ FrameworkCS \ CSoft.Core \ IO \ StorageHelper.cs:18 CSoft.Web.UI.ViewStateHelper.SerializeViewState(HttpContext context、Object state )のCSoft.Core.IO.StorageHelper.Save(String fileName、String content))in c:\ Projectos \ FrameworkCS \ CSoft.Web.Controls \ Web \ UI \ ViewStateHelper.cs:65 CSoft.Web.UI.Page.SavePageStateToPersistenceMedium(Object state)in c:\ Projectos \ FrameworkCS \ CSoft.Web.Controls \ Web \ UI \ Page.cs:302
System.Web.UI.Page.SaveAllState()+236
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint、Boolean includeStagesAfterAsyncPoint)+1099