Why does my NuGet Gallery return 500 from nuget push?

前端 未结 5 1450
自闭症患者
自闭症患者 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条回答
  •  傲寒
    傲寒 (楼主)
    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).

提交回复
热议问题