405 Method Not Allowed in NuGet Push

tucaz picture tucaz · May 9, 2013 · Viewed 14.6k times · Source

My NuGet server is throwing a 405 Not Allowed when I try to make a push. At least, thats what NuGet console says:

Failed to process request. 'Method Not Allowed'.
The remote server returned an error: (405) Method Not Allowed..

But when I look at the actual HTTP response with Fiddler the problem seems to be totally different:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code></code>
  <message xml:lang="en-US">The URL representing the root of the service only supports GET requests.</message>
</error>

Any ideas on what might be going on?

Thanks!

Answer

Kevin Smyth picture Kevin Smyth · Aug 6, 2013

In addition to using nuget push -Source http://nugetserver.com, I did this:

<!--Add the following to the beginning of <system.webServer><modules>:-->
<remove name="WebDAVModule" />
<!--Add the following to the beginning of <system.webServer><handlers>:-->
<remove name="WebDAV" />

Source: Nuget issue #1789