Search code examples
nugetnuget-server

Nuget Server issue post migration to Win 2016


I have migrated nuget repository from Win 2008 to Win 2016. Alias to that server: http://xyz.mycompany.com/NugetFeed

Apart of windows, IIS is different as well, on the new server it is IIS 10.

After migration, nuget works pretty well, except one function. I can browse packages via web (http://xyz.mycompany.com/NugetFeed) or via Visual Studio etc. Visual Studio can see packages created manually.

The only problem is with the nuget push.

>nuget push FEDivaNET.dll*.nupkg -Source http://xyz.mycompany.com/NugetFeed/ D568CD48-1609-40C9-9A5D-7ADC808129E5 Pushing FEDivaNET.dll.3.41.73.nupkg to 'http://xyz.mycompany.com/NugetFeed/'... PUT http://xyz.mycompany.com/NugetFeed/ NotFound http://xyz.mycompany.com/NugetFeed/ 128ms Response status code does not indicate success: 404 (Not Found). System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at NuGet.Protocol.Core.Types.PackageUpdateResource.<>c.<PushPackageToServer>b__23_0(HttpResponseMessage response) at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__181.MoveNext()

  • It is not a problem with the URL. When you try to modify URL then you will get different error
  • It is not a problem with permissions to D:\MyServer\NugetPackages on server, as I have set full permissions to that folder. I have also moved packages folder to different locations (ie. some other external network drive), but I am having same issue.

I tried compiling 2 different Nuget.Server versions: 2.14.0 and 3.1.2 ...Same exception.

Inside IIS, I am pretty sure I have set same settings as on the old server. Also I have INTEGRATED pipeline mode, so everything is good. I also tried setting authentication via technical users etc.

Not sure where is the issue, I think I checked every single setting. I tried with APIKEY, and without APIKEY. I modified every single setting in the Web.config, no luck…..


Solution

  • When you create website in IIS 10, then by default PUT verb is not allowed.

    This can be set here:

    IIS -> YOUR WebSite -> Request Filtering -> HTTP Verb tab: **Set PUT verb**
    

    This has fixed an issue.