0

Installation of Visual Studio local help (Books Online) fails with a 407 Proxy Authentication Required error.

The problem here is that if you are behind a not-terribly-friendly corporate firewall or proxy, you may have a hard time installing local help in Visual Studio 2013.

When I fired up the Help Viewer v2.1, I would initially see the list of help topics that might be installed. Instead I'd get a notification that errors had occurred. Drilling down into that, I'd see that our corporate proxy had handed back a 407 Proxy Authentication Required response asking for NTLM authentication. Apparently, the Help Viewer isn't smart enough to respond intelligently handle this ordinary HTTP response.

The question is: how to work around this problem, since getting the network gods to set up a more transparent proxy seems...unlikely.

Nicholas Carey
  • 71,308
  • 16
  • 93
  • 135

1 Answers1

0

The question, Visual Studio Error: (407: Proxy Authentication Required) (related, but not the same problem) helped lead me to the solution, as did this conversation:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/65c07e43-b652-496e-acbd-4d98861d527e/cannot-install-local-help-in-visual-studio-11?forum=vssetup

There are, apparently, 3 different processes involved in getting help installed for VS 2013:

  • The Microsoft Help Viewer (HlpViewer.exe)
  • The Microsoft Help Content Manager (HlpCtntMgr.exe)
  • The BITS service (Background Intelligent Transfer Service)

The above threads will lead you to monkeying with the config file for the help viewr, but that's insufficient to fix the problem. You will need to do the following:

  1. Navigate to the help viewer's install directory (default location is C:\Program Files (x86)\Microsoft Help Viewer\v2.1).

  2. Create or edit the file HlpViewer.exe.config so that it has a <system.net> element that looks like this:

    <?xml version="1.0"?>
    <configuration>
      <system.net>
        <settings>
          <ipv6 enabled="true"/>
        </settings>
        <defaultProxy enabled="true" useDefaultCredentials="true">
          <proxy
            bypassonlocal="True"
            proxyaddress="http://your-proxy-server:80/"
          />
        </defaultProxy>
      </system.net>
    </configuration>
    

    Depending on the vagaries of your proxy configuration, you might or might not need the <proxy> element.

  3. Do the same for HlpCtntMgr.exe.config.

  4. BITS (Background Intelligent Transfer Service) has a configuration value, UseLmCompat that tells it when to send NTLM authentication credentials. From the documentation,

    The registry value is a DWORD. The following table lists the possible values for UseLMCompat:

    Value Description
    ----- -----------
      0   BITS will send implicit credentials whenever the server prompts
            for NTLM or Kerberos credentials.
      1   BITS will send implicit credentials only if the client computer's
            LMCompatibilityLevel registry value is greater than or equal to 2.
            Prior to BITS 1.5:  Not supported
      2   BITS will send implicit credentials only if the application called
            the SetCredentials method.
            Prior to BITS 2.0:  Not supported
    

    The default cofiguration appears to be 2. You'll probably need to modify that in the registry at

    HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/BITS/UseLmCompat
    

    where you'll want that value to be 0, so it will provide credentials on request.

    NOTE: Since Microsoft, in its infinite wisdom, has blessed us with, not one, but two registries (32-bit and 64-bit), you'll need to make the above change twice, using the appropriate instances of regedit.exe located at

    • 32-bit: C:\Windows\regedit.exe
    • 64-bit: C:\Windows\SysWOW64\regedit.exe
  5. Having done that, you'll need to bounce BITS. You can do that by rebooting your machine, or via the Services control panel (services.msc), where it's listed under the name Background Intelligent Transfer Service.

At this point, you should be good to go.

Community
  • 1
  • 1
Nicholas Carey
  • 71,308
  • 16
  • 93
  • 135