Home > Visual Studio .Net > Visual Studio .Net 2013 – Login fails with error “Browser is security restricted or JavaScript is disabled”
  1. Josh Collins
    2014/04/14 at 03:29

    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.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: