NuGet.Server returns 404 error

user2839499 picture user2839499 · May 29, 2015 · Viewed 9.7k times · Source

I have followed the instructions to setup and host my own NuGet feed. I am running the web application on a Windows 2012 (IIS 8.5) box.

I build and run the solution and get the default.aspx page...

Which says "You are running NuGet.Server v2.8.60318.667" and "Click here to view your packages".

When I click on the "here" link I get a "404 - File or directory not found." error.

  • I can successfully run a nuget.exe push command to put packages on the Nuget server; however I get a 404 error when attempting to run nugget.exe list command.
  • I have restarted IIS and the server
  • I have rebuilt the NuGet.Server web application from scratch.
  • I have tried hosting the NuGet.Server on a Windows 7 box with no success.
  • The Web.Config has the following entry

    <modules runAllManagedModulesForAllRequests="true">
    
  • The web.config also has an entry to register the .nupkg extension as mimeType="application/zip"

It seems like the url routing is not working, but I can't seem to pin down what I am doing wrong. Something is preventing the odata feed from working.

I know there are great 3rd party implementations of NuGet server, but I would really like to just get the free one working and it seems like it should be so easy. Any thoughts or troubleshooting tips would be appreciated.

Answer

AndrewD picture AndrewD · Jun 6, 2017

If you create a new empty VB project you will also get a 404 (in Packages and browsing using NuGet Manager).

You appear to have to create the project as C# and it works as advertised!

And yet the source code appears identical :(