Nuget Push failed to process request System.Net.HttpWebRequest.GetResponse()

When trying to push a NuGet package to our new local NuGet repository we recieved the following error:

System.InvalidOperationException: Failed to process request. ‘Internal Server Er ror’. The remote server returned an error: (500) Internal Server Error.. —> System.N et.WebException: The remote server returned an error: (500) Internal Server Erro r. at System.Net.HttpWebRequest.GetResponse() at NuGet.RequestHelper.GetResponse(Func`1 createRequest, Action`1 prepareRequ est, IProxyCache proxyCache, ICredentialCache credentialCache, ICredentialProvid er credentialProvider) at NuGet.HttpClient.GetResponse() at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode) — End of inner exception stack trace — at NuGet.PackageServer.EnsureSuccessfulResponse(HttpClient client, Nullable`1 expectedStatusCode) at NuGet.PackageServer.PushPackageToServer(String apiKey, Func`1 packageStrea mFactory, Int32 timeout) at NuGet.PackageServer.PushPackage(String apiKey, IPackage package, Int32 tim eout) at NuGet.Commands.PushCommand.PushPackageCore(String source, String apiKey, P ackageServer packageServer, String packageToPush, TimeSpan timeout) at NuGet.Commands.PushCommand.PushPackage(String packagePath, String source, String apiKey, TimeSpan timeout) at NuGet.Commands.PushCommand.ExecuteCommand() at NuGet.Commands.Command.Execute() at NuGet.Program.Main(String args)

It turns out that the guy that set up the NuGet server had forgotten to grant the app pool write permissions and the website couldn’t write to the local disk. In case you need it here is a great answer on Stack overflow on how to grant app pool permissions.

comments powered by Disqus