Attempting to install NuGet server on iis 10 on w2016 yields 404 not found error

257 views Asked by At

My environment: Windows 10 Creator (1703 with current updates to this date)

  • Visual Studio 2017, Enterprise, 15.3 with most of the goodies turned on.

Windows 2016, again with all current updates.

  • iis 10 with WebDeploy installed (that's a whole other installation nightmare, suffice it to say that SO helped there and the answers are already out there so I won't go into it here). Turned on ASP.NET 4.6, otherwise mainly accepted the defaults.

My process:

  • As per the NuGet.Server documentation, create a new ASP.NET MVC project using the "Empty" template and download and install NuGet.Server as specified. I'm using .NET 4.7 as my framework.

  • Compile and configure as desired (at least ensure you have an api key in place).

  • Deploy to iis using the "Publish" | Web Deploy option

Try to get in touch with the NuGet.Server on the website and fail miserably! My bindings are 192.168.1.25 (yes, the server has a fixed IP address), port 80. The name of the site is AWENuGet and the desired url is www.awenuget.com.

To be sure, all of this works just fine if you take the same project as described above, assign a local port number (creating the project will do that anyway) and then simply running the application in Visual Studio works just fine.

But, when I took that self-same project and simply deployed it to iis, miserable failure.

I tried to open the host file (Windows\System 32\drivers\etc) and added the following:

192.168.1.25 www.awenuget.com

to said file and it still failed.

1

There are 1 answers

0
Fred On BEST ANSWER

...and the answer, for me, was to take that same hosts file entry that I made on the server so that the server could see it and install it in my dev machine's hosts file and voila! NOW it works just fine.