Access denied for localstorage in IE10

Yesterday I installed Windows 8 and now I’m trying to understand why I get the "Access Denied" message when accessing localstorage. The page runs on the same PC with a browser (http: // localhost). I feel that one of the security options in IE 10 is wrong, but I did not understand which one.

JavaScript line of code causing the error:

if(window.localStorage.getItem('phone') == null) 

The code works fine in the latest version of Chrome.

+47
javascript local-storage internet-explorer-10 access-denied
Oct 27 '12 at 16:45
source share
7 answers

Our users had problems with websites using the LocalStorage function (including Twitter) on Windows 8 with IE 10. When I opened one of these sites using the F12 development tools, the message SCRIPT5: Access is denied appeared on the console.

After working with Microsoft support, we identified the reason. This turned out to be a problem with the settings in the C:\Users\username\Appdata\LocalLow in their user profile.

Each folder on your computer has an integrity setting. For more information on this setting, see: http://msdn.microsoft.com/en-us/library/bb625964.aspx

It is AppData\LocalLow set the integrity parameter in the AppData\LocalLow (and its subfolders) in each Low user profile (hence the name). In our case, the integrity level was set incorrectly in this folder. To fix the problem, run the following command in a command prompt window:

icacls %userprofile%\Appdata\LocalLow /t /setintegritylevel (OI)(CI)L

(If there is more than one user account on the computer and other users have the same problem, this command should be run under each vulnerable user account.)

How did this parameter change in the first place? In our case, this was caused by a problem in the customized Windows 8 image that we deployed on our workstations. For others who have a problem, my research has shown that using the System Cleaner utility may be to blame.

+58
Dec 30 '14 at 22:53
source share
β€” -

Try to enable advanced protected mode in IE settings on the "Advanced" tab in the "Security" submenu. This allows you to use the Microsoft XSS filter. I had similar problems when logging into SE, as well as when receiving Google + notifications, and in my first workaround, IE was running with administrator privileges. But I think EP mode will do the trick in your case.

Related Links: Overview of Enhanced Protected Mode

+3
Nov 28 '12 at 18:26
source share

Mark Russinovich always says: "If in doubt, use the Process Monitor :

localStorage data is stored in XML files in the following folder: C: \ Users \ [USERNAME] \ AppData \ Local \ Microsoft \ Internet Explorer \ DOMStore

The file’s activity profile during playback of a problem may tell you if a problem arose due to the lack of access rights to the file or, possibly, even an antivirus program.

I can reproduce the error by adding a read-only attribute to "DOMStore \ container.dat". You must verify that all permissions and file / folder attributes are set correctly. On my machine, administrators and my account have full permission for the specified folder.

+3
Jan 24 '13 at 10:10
source share

Sure, there may be many causes of the same symptoms, but here is what fixed this problem for me.

I had only one of many Windows 7 PCs with IE11 that showed the "Access Denied" symptom when trying any JavaScript that included window.localStorage from other reputable and well-managed websites. Using Process Explorer showed that the proximal reason was ACCESS DENIED when taskhost.exe (acting on behalf of Internet Explorer) tried to open DOMStore\container.dat for Generic Read-Write. Actually it was worse: if I deleted container.dat , the same ACCESS DENIED occurred, even through the file no longer existed. And if I deleted the (hidden) DOMStore folder when taskhost.exe tried to recreate it, it also got ACCESS DENIED.

After two days of chasing false wires, the final decision was as follows:

Registry entry:

 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\LowCache\Extensible Cache\DOMStore\CachePath 

(pay attention to LowCache in this line) was installed incorrectly:

 %USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\DOMStore 

when it should be:

 %USERPROFILE%\AppData\LocalLow\Microsoft\Internet Explorer\DOMStore 

as a result, low-integrity local storage requests were sent to regions with a high degree of integrity of AppData disk storage, thereby generating ACCESS DENIED errors and killing the use of JavaScript window.localStorage .

This registry entry must have been incorrect for many years: perhaps a side effect of enthusiasm when viewing platform previews, etc. This error persisted while completely uninstalling and reinstalling IE11.

There is a similar registry entry for the medium-definition cache:

 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Extensible Cache\DOMStore\CachePath 

and this is true as:

 %USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\DOMStore 

and should not be changed.

+3
May 10 '14 at 15:49
source share

Go to the "Tools / Internet Properties / Advanced" section and in the "Security" section, select the "Enable DOM storage" checkbox. This should fix the problem.

+1
Jan 08
source share

I added the sites involved in the IE Trusted Sites section and have not yet received an error.

0
Oct 20 '14 at
source share

This problem can also be caused by missing or corrupt registry entries. If a reset does not LocalLow problem, the LocalLow folder has the correct integrity level and the DOMStore registry value is correct , run the following commands to re-register IE in the profile:

32 bit OS:

 C:\WINDOWS\system32\ie4uinit.exe -BaseSettings 

64-bit OS:

 C:\WINDOWS\system32\ie4uinit.exe -BaseSettings C:\Windows\SysWOW64\ie4uinit.exe -BaseSettings 

See the MSDN IE Blog for more information.

0
Jun 21 '15 at 16:00
source share



All Articles