“...”处的 V2 提要返回意外状态代码“503 服务不可用”

The V2 feed at ‘…’ returned an unexpected status code '503 Service Unavailable'

我知道有类似的问题,但是 none 有这个确切的错误,所以我希望有不同的答案。

我遇到错误:

[feedname] The V2 feed at 'http://domain.tld/NuGetServer/nuget/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net46'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '503 Service Unavailable'.

我在 Visual Studio (2017 Professional) 中的包管理器 UI 以及 VS 中的控制台中收到此故障。我已尝试清除 NuGet 缓存、TFS 缓存、检查(并酌情修改)NuGet (AppData\Local) 的代理设置、TFS 的代理设置、Internet 选项代理设置,结果显然没有变化。我也试过在 VS 2010 中访问提要,但它在那里也不起作用。

为什么会这样?这似乎是一个与代理相关的问题,但我已经尝试了其他问题提到的所有内容,但无济于事。

一条线索可能如下:当我通过浏览器访问提要 URL 时,我得到以下信息:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="http://domain.tld/NuGetServer/nuget/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Search</title>
  <id>http://domain.tld/NuGetServer/nuget/Search</id>
  <updated>2018-06-25T21:31:57Z</updated>
  <author>
    <name />
  </author>
  <link rel="self" title="Search" href="Search" />
</feed>

这是排除搜索参数后得到的结果:

<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app" xml:base="http://domain.tld/NuGetServer/nuget/">
  <workspace>
    <atom:title>Default</atom:title>
      <collection href="Packages">
        <atom:title>Packages</atom:title>
      </collection>
  </workspace>
</service>

NuGet 服务器配置不正确。我不太确定问题出在哪里,但是一旦服务器被重新配置为具有默认设置,并且 Visual Studio 中的 URL 与服务器配置的 URL 相匹配,问题已解决。