【问题标题】:Can't Install Local Help: 407 Proxy Authentication Error无法安装本地帮助:407 代理验证错误
【发布时间】:2014-07-23 00:36:59
【问题描述】:

安装 Visual Studio 本地帮助(联机丛书)失败,出现 407 Proxy Authentication Required 错误。

这里的问题是,如果您使用了不太友好的公司防火墙或代理,您可能很难在 Visual Studio 2013 中安装本地帮助。

当我启动 Help Viewer v2.1 时,我最初会看到可能安装的帮助主题列表。相反,我会收到发生错误的通知。深入研究,我会看到我们的公司代理已交回 407 Proxy Authentication Required 响应,要求进行 NTLM 身份验证。显然,帮助查看器不够聪明,无法智能地响应处理这个普通的 HTTP 响应。

问题是:如何解决这个问题,因为让网络大神设置一个更透明的代理似乎......不太可能。

【问题讨论】:

    标签: visual-studio proxy visual-studio-2013


    【解决方案1】:

    问题Visual Studio Error: (407: Proxy Authentication Required)(相关但不是同一个问题)帮助我找到了解决方案,就像这次对话一样:

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

    显然,为 VS 2013 安装帮助涉及 3 个不同的过程:

    • Microsoft 帮助查看器 (HlpViewer.exe)
    • Microsoft 帮助内容管理器 (HlpCtntMgr.exe)
    • BITS 服务(后台智能传输服务

    上面的线程会导致你在帮助查看器的配置文件中胡闹,但这不足以解决问题。您需要执行以下操作:

    1. 导航到帮助查看器的安装目录(默认位置是C:\Program Files (x86)\Microsoft Help Viewer\v2.1)。

    2. 创建或编辑文件HlpViewer.exe.config,使其具有如下所示的<system.net>元素:

      <?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>
      

      根据您的代理配置的变幻莫测,您可能需要也可能不需要&lt;proxy&gt; 元素。

    3. HlpCtntMgr.exe.config 执行相同操作。

    4. BITS(后台智能传输服务)有一个配置值UseLmCompat,它告诉它何时发送 NTLM 身份验证凭据。来自the documentation

      注册表值是一个 DWORD。下表列出了可能的值 使用LMCompat:

      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
      

      默认配置似乎是2。您可能需要在 注册表在

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

      您希望该值为0,因此它将根据要求提供凭据。

      注意:由于 Microsoft 以其无限的智慧为我们提供了,不是一个,而是 两个 注册表(32 位和 64 位),所以您'将需要使用位于的regedit.exe 的适当实例进行两次上述更改

      • 32 位: C:\Windows\regedit.exe
      • 64 位: C:\Windows\SysWOW64\regedit.exe
    5. 完成后,您需要退回 BITS。您可以通过重新启动计算机或通过服务控制面板 (services.msc) 来执行此操作,它在名称 Background Intelligent Transfer Service 下列出。

    此时,您应该可以开始了。

    【讨论】:

      猜你喜欢
      • 2010-11-15
      • 1970-01-01
      • 1970-01-01
      • 2012-11-22
      • 1970-01-01
      • 2010-11-28
      • 1970-01-01
      • 1970-01-01
      • 2021-10-10
      相关资源
      最近更新 更多