Troubleshooting network-related errors when you install or use Visual Studio

We've got solutions for the most typical network- or proxy-related errors that you might encounter when you install or use Visual Studio behind a firewall or a proxy server.

Error: “Proxy authorization required”

This error generally occurs when users are connected to the internet through a proxy server, and the proxy server blocks the calls that Visual Studio makes to some network resources.

To fix this error:

  • Restart Visual Studio. A proxy authentication dialog box should appear. Enter your credentials when prompted in the dialog.

  • If restarting Visual Studio does not solve the problem, it might be that your proxy server does not prompt for credentials for http://go.microsoft.com addresses but does so for *.visualStudio.com addresses. For these servers, consider whitelisting the following URLs to unblock all sign-in scenarios in Visual Studio:

    • *.windows.net

    • *.microsoftonline.com

    • *.visualstudio.com

    • *.microsoft.com

    • *.live.com

  • You can otherwise remove the http://go.microsoft.com address from the whitelist so that the proxy authentication dialog shows up for both the http://go.microsoft.com address and the server endpoints when Visual Studio is restarted.

    OR

  • If you want to use your default credentials with your proxy, you can perform the following actions:

    1. Find devenv.exe.config (the devenv.exe configuration file) in: %ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE or %ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE.

    2. In the configuration file, find the <system.net> block, and then add this code:

      <defaultProxy enabled="true" useDefaultCredentials="true">
          <proxy bypassonlocal="True" proxyaddress=" HYPERLINK "http://<yourproxy:port#" http://<yourproxy:port#>"/>
      </defaultProxy>
      

      You must insert the correct proxy address for your network in proxyaddress="<http://<yourproxy:port#>.

      OR

  • You can also follow the instructions in the How to connect through an authenticated Web Proxy blog post, which shows you how to add code that will allow you to use the proxy.

Error: “The underlying connection was closed”

If you are using Visual Studio in a private network that has a firewall, Visual Studio might not be able to connect to some network resources. These resources can include Visual Studio Team Services (VSTS) for sign-in and licensing, NuGet, and Azure services. If Visual Studio fails to connect to one of these resources, you might see the following error message:

The underlying connection was closed: An unexpected error occurred on send

Visual Studio uses Transport Layer Security (TLS) 1.2 protocol to connect to network resources. Security appliances on some private networks block certain server connections when Visual Studio uses TLS 1.2.

To fix this error:

Enable connections for the following URLs:

  • https://management.core.windows.net

  • https://app.vssps.visualstudio.com

  • https://login.microsoftonline.com

  • https://login.live.com

  • https://go.microsoft.com

  • https://graph.windows.net

  • https://app.vsspsext.visualstudio.com

  • *.azurewebsites.net (for Azure connections)

  • *.visualstudio.com

  • cdn.vsassets.io (hosts content delivery network, or CDN, content)

  • *.gallerycdn.vsassets.io (hosts VSTS extensions)

  • static2.sharepointonline.com (hosts resources that Visual Studio uses in the Office UI Fabric kit, such as fonts)

  • *.nuget.org (for NuGet connections)

    Note

    Privately owned NuGet server URLs may not be included in this list. You can check for the NuGet servers that you are using in %APPData%\Nuget\NuGet.Config.

Get support

If your Visual Studio installation fails, see the Troubleshooting Visual Studio 2017 installation and upgrade issues page. If none of the installation troubleshooting steps help, you can contact us by live chat for installation assistance (English only). For details, see the Visual Studio support page.

Here are a few more support options:

See also