【发布时间】:2017-06-02 13:50:42
【问题描述】:
我们使用Nuget.Server 创建了一个本地 NuGet 提要。它是一个简单的 ASP.NET 应用程序,托管在 IIS Web 服务器上,该服务器是我们本地公司网络的一部分。
Feed 的 url 如下所示:
https://abc.company.com/packages/nuget
ISS认证开启如下:
.NET 授权如下所示:
如果我用 Postman 或 Fiddler 调用上述提要 url,我会得到以下响应:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<service xml:base="https://abc.company.com/packages/nuget/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
<workspace>
<atom:title>Default</atom:title>
<collection href="Packages">
<atom:title>Packages</atom:title>
</collection>
</workspace>
</service>
如果我现在在 Visual Studio NuGet 包源中添加 URL: 然后选择新创建的包源,在我输入域凭据(域\用户)的位置出现以下屏幕,但没有任何反应:
如前所述,当我使用任何浏览器(IE、Chrome、Edge)访问该站点时,我不必输入我的凭据,Fiddler/Postman 也不需要任何凭据。
在 VS PackageManager 输出中,我收到以下错误消息:
[Local] The V2 feed at 'https://abc.company.com/packages/nuget/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='net462'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '403 Forbidden ( The server denied the specified Uniform Resource Locator (URL). Contact the server administrator. )'.
当我使用浏览器调用此 URL 时,我没有收到任何错误。
这个设置有什么问题?
【问题讨论】:
标签: visual-studio iis nuget-package http-status-code-403 nuget-server