访问被拒绝在IE10中进行本地存储 [英] Access Denied for localstorage in IE10

查看:210
本文介绍了访问被拒绝在IE10中进行本地存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我安装了Windows 8,现在我正在尝试了解访问localstorage时收到拒绝访问消息的原因。该页面与浏览器(http:// localhost)在同一台PC上提供。我的感觉是IE 10中的一个安全设置是错误的,但我还没弄明白哪一个。

Yesterday I installed Windows 8 and am now trying to understand why I am getting an "Access Denied" message when accessing localstorage. The page is being served on the same PC with the browser (http://localhost). My feeling is that one of the security settings in IE 10 is wrong, but I haven't figured out which one.

触发错误的JavaScript代码行是:

The line of JavaScript code triggering the error is:

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

该代码在最新版Chrome中运行良好。

The code works fine in the latest version of Chrome.

推荐答案

我们的用户在Windows 8和IE 10上使用LocalStorage功能(包括Twitter)时遇到了网站问题。当打开F12开发人员工具访问其中一个网站时, SCRIPT5:访问被拒绝消息出现在控制台上。

Our users were having issues with web sites using the LocalStorage feature (including Twitter) on Windows 8 with IE 10. When accessing one of these sites with the F12 Developer Tools open, a SCRIPT5: Access is denied message appeared on the console.

使用Microsoft支持后,我们确定了原因。事实证明,用户个人资料中 C:\ Users \username \ Appdata \ LocalLow 文件夹的设置存在问题。

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

计算机上的每个文件夹都具有完整性设置。有关此设置目的的更多信息,请访问: http://msdn.microsoft.com/en-us /library/bb625964.aspx

Each folder on your computer has an integrity setting. More information about the purpose of this setting is here: http://msdn.microsoft.com/en-us/library/bb625964.aspx

AppData \ LocalLow 文件夹中的完整性设置(和每个用户的个人资料中的子文件夹应该设置为低(因此名称)。在我们的示例中,未在此文件夹上正确设置完整性级别。要解决此问题,请在命令提示符窗口中运行以下命令:

The integrity setting on the AppData\LocalLow folder (and its subfolders) in each user's profile is supposed to be set to "Low" (hence the name). In our case, the integrity level was not set correctly on this folder. To rectify 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 the other users are having the same issue, the command needs to be run under each affected user's account.)

首先如何更改此设置?在我们的例子中,它是由我们部署到工作站的自定义Windows 8映像中的问题引起的。对于其他有问题的人,我的研究表明,使用系统清洁工具可能是罪魁祸首。

As for how this setting got changed in the first place? In our case, it was caused by a problem in the customized Windows 8 image we deployed to our workstations. For others that are having the issue, my research has revealed that the use of a "system cleaner" utility may be to blame.

这篇关于访问被拒绝在IE10中进行本地存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆