visual-studio-codeunc

The host '...' was not found in the list of allowed hosts. Do you want to open it anyway?


Since updating to Visual Studio Code v. 1.78.2 this warning has been popping up. It is appearing because the folder I am working out of is using a UNC path. I rely on this path.

The VS help page states:

configure the host to be allowed via the security.allowedUNCHosts setting (for example add server-a when you open a path such as \server-a\path)

Where is this setting?


Solution

  • Go to Settings Ctrl + , and search for 'allowedUNCHosts'. You'll find it under the Security section.

    Link: vscode://settings/security.allowedUNCHosts

    Note: "a restart is required when changing this setting"

    a screenshot of vs code settings specifically the security section and the allowed UNCHosts