VS Express 2013 for Web - 浏览器受到安全限制或 JavaScript 被禁用 [英] VS Express 2013 for Web - Browser is security restricted or JavaScript is disabled

查看:27
本文介绍了VS Express 2013 for Web - 浏览器受到安全限制或 JavaScript 被禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最初在桌面上安装了 Microsoft Visual Studio Express 2013 for Web.我的桌面运行带有 Internet Explorer 11 的 Windows 8.1.它运行良好,直到许可证在前 30 天后过期.我尝试登录以续订许可证,但是在单击登录"按钮后,我收到一个错误对话框.该对话框指出浏览器安全受限或 javaScript 已禁用.我别无选择,只能关闭并退出 Visual Studio.

I initially installed the Microsoft Visual Studio Express 2013 for Web on my desktop. My desktop runs Windows 8.1 with internet explorer 11. It ran fine until the license expired after the first 30 days. I tried to sign in to renew the license, however after clicking the 'sign in' button I get an error dialog. The dialog states 'Browser is security restricted or javaScript is disabled. I have no other option but to close and exit Visual Studio.

我去了微软的在线论坛.有关于如何修复错误的讨论和建议.我尝试降低 Internet Explorer 中安全选项卡的设置.我已验证脚本选项已启用.我还将 https://*.visualstudio.com 添加到受信任站点选项卡.论坛上的其他用户也尝试了相同的建议,但未能成功登录 Visual Studio 应用程序.

I went to the online forums for Microsoft. There were discussions and suggestions on how to fix the error. I tried lowering the settings for the security tab in internet explorer. I have validated the option for scripting is enabled. I have also added https://*.visualstudio.com to the trusted sites tab. Other users on the forum have tried the same suggestions and have not succeeded in signing into the visual studio application.

推荐答案

人们遇到的另一个问题是登录对话框的错误.登录对话框使用 Web 浏览器控件登录用户.默认情况下,它加载about:blank"作为 URI.然后它继续尝试执行一些 JavaScript(只是;")以验证它是否有权这样做.在某些机器上,这是有问题的,因为about:blank"已映射到区域 0,或本地机器区域.当执行 JavaScript 时,MSHTML 将检查 URI 的区域,然后检查执行脚本的策略.默认情况下,本地机器区域被锁定,所有脚本执行都会产生查询策略.这意味着如果您在沉浸模式(也就是 Internet Explorer)下运行,您将收到一个消息框,询问您是否要执行脚本.但是,VS 2013 的登录"对话框使用的 Web 浏览器控件不会在沉浸模式下运行 MSHTML 代码,因此查询策略实际上等同于禁止策略.这里的错误是 VS 中有人假设about:blank"解析为 Internet 区域,当它解析为本地计算机区域时,您会得到此行为.

There is another issue people are running into that is a bug with the login dialog. The login dialog is using a Web Browser control to login the user. By default it loads up "about:blank" as the URI. It then proceeds to try to execute some JavaScript (just ";") to verify it has permissions to do so. On some machines this is problematic because "about:blank" has been mapped to zone 0, or the Local Machine zone. When the JavaScript is executed MSHTML will check the zone of the URI and then the policy for executing scripts. By default the Local Machine zone is locked down, and all script executions result in a Query policy. What this means is if you're running in immersion mode (aka in Internet Explorer) you will get a message box asking if you want to execute the script. However, the Web Browser control used by VS 2013's "Sign In" dialog doesn't run MSHTML code in immersion mode, so the Query policy effectively equates to a Disallow policy. The bug here is someone in VS assumed "about:blank" resolves to the Internet zone, and when it resolves to the Local Computer zone you get this behavior.

解决方法是删除about:blank"区域映射.将 regedit 指向此键:

The workaround is to remove "about:blank" zone mapping. Point regedit to this key:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]

删除空白"键.

或者,您可以更改用于执行脚本的本地机器锁定策略.reg 键是:

Alternatively you can change the Local Machine Lockdown policy for executing scripts. The reg key for that is:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\0]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\0]

将1400"DWORD 值设置为 0.

Set the "1400" DWORD value to 0.

这篇关于VS Express 2013 for Web - 浏览器受到安全限制或 JavaScript 被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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