Why does my NuGet Gallery return 500 from nuget push?

前端 未结 5 1451
自闭症患者
自闭症患者 2020-12-31 09:33

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

相关标签:
5条回答
  • 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.

    0 讨论(0)
  • 2020-12-31 09:56

    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?

    0 讨论(0)
  • 2020-12-31 10:06

    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).

    0 讨论(0)
  • 2020-12-31 10:10

    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.

    0 讨论(0)
  • 2020-12-31 10:13

    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.**
    ...
    ...
    
    0 讨论(0)
提交回复
热议问题