IsolatedStorage not working with IE protected mode? WITH#

Using Isolated Storage with IE Protected Mode .

I am building the IE8 (VS2010) IE8 add-on application, but I have problems saving data using IsolStorage on a 64-bit Windows 7 machine when Internet Explorer protected mode is enabled by default.

(I proceed to this method using "Settings as Properties" .Settings.Default.Save (), which also failed with IE protected mode. I also tried to save the files in LocalLow and no luck.)

Can someone please indicate how I can change the following code to enable it in IE with protected mode? I tried so many ideas and nothing has worked so far. Surely there should be a way to save data?

//FileIOPermission perm = new FileIOPermission(PermissionState.Unrestricted); 
    //perm.Assert(); 
    //perm.Demand();  

//---Write---
IsolatedStorageFile app_isoStore = IsolatedStorageFile.GetStore(
    IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null);
IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream(
    "app_started.txt", FileMode.OpenOrCreate, FileAccess.Write, app_isoStore);

StreamWriter iswriter = new StreamWriter(isoStream);
iswriter.WriteLine("Run");
iswriter.Close();

//app_isoStore.Dispose();
app_isoStore.Close();

//---Read---
IsolatedStorageFile app_isoStoreCheck = IsolatedStorageFile.GetStore(
    IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null);
IsolatedStorageFileStream isoReadStream = new IsolatedStorageFileStream(
    "app_started.txt", FileMode.Open, FileAccess.Read, app_isoStoreCheck);

StreamReader isreader = new StreamReader(isoReadStream);
string rdata = isreader.ReadToEnd();
isreader.Close();

//app_isoStoreCheck.Dispose();
app_isoStoreCheck.Close();
+3
1

.

GetStore:

  • GetUserStoreForApplication
  • GetUserStoreForUser
  • GetUserStoreForDomain
  • GetMachineStoreForApplication
  • GetMachineStoreForUser
  • GetMachineStoreForDomain

? .NET ? ? ? IsolatedStorage ? ? ?

app_started.txt, ? , ... NTFS ACL ..

http://msdn.microsoft.com/en-us/library/3ak841sy(v=vs.80).aspx

Just some suggestions.

NTN

+1
source

Source: https://habr.com/ru/post/1796555/


All Articles