Home
> Visual Studio .Net > Visual Studio .Net 2013 – Login fails with error “Browser is security restricted or JavaScript is disabled”
Visual Studio .Net 2013 – Login fails with error “Browser is security restricted or JavaScript is disabled”
After installing Visual Studio .Net 2013 onto a Windows Server 2012 system for doing SharePoint 2013 development, I found I was unable to login with my MSDN profile to Visual Studio. Instead I received a cryptic and unhelpful error message “Browser is security restricted or JavaScript is disabled”. I searched the web a little and found assorted solutions which seemed to have assorted results, and finally I found that the problem went away when I turned off “IE Enhanced Security Configuration” from the Server Manager. I was able to then restart Visual Studio and log in with out a problem.
I actually found this as a solution for a number of times when I was having issues activating Microsoft Office 2013 also.
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.
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]
Remove the “blank” key.
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]
Set the “1400” DWORD value to 0.