I set up the new NuGet Gallery on a web server (under IIS 7.0) where I work. The site itself is set up and runs fine. We are able to register accounts, confirm email address
I fixed this issue by changing the permissions for the IIS user. I added write permissions to IIS_IUSRS
.
Right click the site in IIS > edit permissions > security
From there you add the user or group and give them write permissions.
I assume you're referring to the new gallery: https://github.com/NuGet/NuGetGallery
Can you try hitting /elmah.axd from an admin account and see if you get more info about the error?
Since it's not mentioned, here was my scenario:
I was able to push (and retrieve) most packages without any problems. But, one package kept causing a 404 error when I attempted to push it. Several sources online indicated that I should add a mime-type for .nupkg, however all this accomplished (regardless of the mime type) was to turn the error into a 500 internal server error.
It turns out the package in question was a little larger than normal, and IIS caps the default request limit at 30MB, causing the nuget server to return this obscure error. Changing the setting system.webServer.security.requestFiltering.requestLimits.maxAllowedContentLength
to something bigger resolved it for me (after I removed the mime type I had added).
In my case it was an old local nuget server. The message I found in the logs:
The schema version of 'YourLib' is incompatible with version 'someVersion.a.b' of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
In my case, I downgraded nuget (downloaded an older nuget.exe) and re-created the package. The push now works. I didn't want to disturb the process elsewhere and I needed a quick solution but of course that depends on the scenario one has. In the long run I will update nuget.
I suggest you go to the IIS host server an open up the eventvwr, you should be able to tell exactly why the error happened. look in Windows log / Application
In my case it was because of full disk. The message looks like this:
Application information:
Application domain: /LM/W3SVC/4/ROOT-1-131895206439239270
Trust level: Full
Application Virtual Path: /
Application Path: E:\NuGet.Server\src\NuGet.Server\
Machine name: CM
Process information:
Process ID: 1876
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM
Exception information:
Exception type: IOException
Exception message: **There is not enough space on the disk.**
...
...