title: NuGet push version 3.1.2 returns 405 HTTP error (method not allowed)
body: <p>I use a private NuGet.Server with the newest version 3.1.2.
  My IIS has the WebDAV feature not installed.
   
  Therefore the other <a href="https://stackoverflow.com/questions/16451183/405-method-not-allowed-in-nuget-push">recommendations</a> in how to fix the <code>405 (method not allowed)</code> error, didn't resolve my issue.</p>
  
  <p>My IIS NuGet app has the anonymous authentication enabled with the system user "IUSR".
  This user has full rights to the packagePath <code>E:\NuGet\packages</code></p>
  
  <p>The push command my nuget.server looks like this:</p>
  
  <blockquote>
    <p>nuget push Mypackage.1.0.0.nupkg -NonInteractive -Source <a href="http://srv-dev:8080/SoNuGetHost/" rel="nofollow noreferrer">http://srv-dev:8080/SoNuGetHost/</a> -ApiKey VSTS -Verbosity Detailed</p>
  </blockquote>
  
  <p>The error part looks like this:</p>
  
  <blockquote>
    <p>D:>nuget push OneSignal.RestAPIv3.Client.1.0.3.nupkg -NonInteractive -Source <a href="http://srv-dev:8080/SoNugetHost/" rel="nofollow noreferrer">http://srv-dev:8080/SoNugetHost/</a> -ApiKey VSTS -Verbosity Detailed</p>
    
    <p>NuGet Version: 4.6.2.5055</p>
    
    <p>Pushing OneSignal.RestAPIv3.Client.1.0.3.nupkg to '<a href="http://srv-dev:8080/SoNugetHost/" rel="nofollow noreferrer">http://srv-dev:8080/SoNugetHost/</a>'...</p>
    
    <p>PUT <a href="http://srv-dev:8080/SoNugetHost/" rel="nofollow noreferrer">http://srv-dev:8080/SoNugetHost/</a></p>
    
    <p>MethodNotAllowed <a href="http://srv-dev:8080/SoNugetHost/" rel="nofollow noreferrer">http://srv-dev:8080/SoNugetHost/</a> 446ms</p>
  </blockquote>
  
  <h3>below is the Web.config</h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
  &lt;!--
      For a description of web.config changes see     http://go.microsoft.com/fwlink/?LinkId=235367.
  
      The following attributes can be set on the &lt;httpRuntime&gt; tag.
      &lt;system.Web&gt;
          &lt;httpRuntime targetFramework="4.6" /&gt;
      &lt;/system.Web&gt;
  --&gt;
  &lt;system.web&gt;
      &lt;compilation targetFramework="4.6" /&gt;
      &lt;!-- maxRequestLength is specified in Kb --&gt;
      &lt;httpRuntime targetFramework="4.6" maxRequestLength="2147483647" /&gt;
  &lt;/system.web&gt;
  &lt;system.codedom&gt;
      &lt;compilers&gt;
      &lt;compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /&gt;
      &lt;compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&amp;quot;Web\&amp;quot; /optionInfer+" /&gt;
      &lt;/compilers&gt;
  &lt;/system.codedom&gt;
  &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
      &lt;remove name="WebDAVModule" /&gt;
      &lt;/modules&gt;
      &lt;handlers&gt;
          &lt;remove name="WebDAV" /&gt;
          &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
          &lt;remove name="OPTIONSVerbHandler" /&gt;
          &lt;remove name="TRACEVerbHandler" /&gt;
          &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,PUT,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
           &lt;!-- Depending on IIS configuration, these may have to be added.
           &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
           &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
           &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,PUT,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
          &lt;remove name="OPTIONSVerbHandler" /&gt;
          &lt;remove name="TRACEVerbHandler" /&gt;
          &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
           --&gt;
      &lt;/handlers&gt;
      &lt;staticContent&gt;
      &lt;mimeMap fileExtension=".nupkg" mimeType="application/zip" /&gt;
      &lt;/staticContent&gt;\
      &lt;security&gt;&lt;requestFiltering&gt;&lt;!-- maxAllowedContentLength is specified in Bytes --&gt;&lt;requestLimits maxAllowedContentLength="2147483647" /&gt;&lt;/requestFiltering&gt;&lt;/security&gt;&lt;/system.webServer&gt;
  &lt;appSettings&gt;
      &lt;!--
      Determines if an Api Key is required to push\delete packages from the server. 
      --&gt;
      &lt;add key="requireApiKey" value="true" /&gt;
      &lt;!-- 
      Set the value here to allow people to push/delete packages from the server.
      NOTE: This is a shared key (password) for all users.
      --&gt;
      &lt;add key="apiKey" value="VSTS" /&gt;
      &lt;!--
      Change the path to the packages folder. Default is ~/Packages.
      This can be a virtual or physical path.
      --&gt;
      &lt;add key="packagesPath" value="E:\NuGet\Packages" /&gt;
      &lt;!--
      Change the name of the internal cache file. Default is machine name (System.Environment.MachineName).
      This is the name of the cache file in the packages folder. No paths allowed.
      --&gt;
      &lt;add key="cacheFileName" value="" /&gt;
      &lt;!--
      Set allowOverrideExistingPackageOnPush to false to mimic NuGet.org's behaviour (do not allow overwriting packages with same id + version).
      --&gt;
      &lt;add key="allowOverrideExistingPackageOnPush" value="true" /&gt;
      &lt;!--
      Set ignoreSymbolsPackages to true to filter out symbols packages. Since NuGet.Server does not come with a symbol server,
      it makes sense to ignore this type of packages. When enabled, files named `.symbols.nupkg` or packages containing a `/src` folder will be ignored.
  
      If you only push .symbols.nupkg packages, set this to false so that packages can be uploaded.
      --&gt;
      &lt;add key="ignoreSymbolsPackages" value="true" /&gt;
      &lt;!--
      Set enableDelisting to true to enable delist instead of delete as a result of a "nuget delete" command.
      - delete: package is deleted from the repository's local filesystem.
      - delist: 
      - "nuget delete": the "hidden" file attribute of the corresponding nupkg on the repository local filesystem is turned on instead of deleting the file.
      - "nuget list" skips delisted packages, i.e. those that have the hidden attribute set on their nupkg.
      - "nuget install packageid -version version" command will succeed for both listed and delisted packages.
          e.g. delisted packages can still be downloaded by clients that explicitly specify their version.
      --&gt;
      &lt;add key="enableDelisting" value="true" /&gt;
      &lt;!--
      Set enableFrameworkFiltering to true to enable filtering packages by their supported frameworks during search.
      --&gt;
      &lt;add key="enableFrameworkFiltering" value="false" /&gt;
      &lt;!--
      When running NuGet.Server in a NAT network, ASP.NET may embed the server's internal IP address in the V2 feed.
      Uncomment the following configuration entry to enable NAT support.
      --&gt;
      &lt;!-- &lt;add key="aspnet:UseHostHeaderForRequestUrl" value="true" /&gt; --&gt;
      &lt;!--
      Set enableFileSystemMonitoring to true (default) to enable file system monitoring (which will update the package cache appropriately on file system changes).
      Set it to false to disable file system monitoring.
      NOTE: Disabling file system monitoring may result in increased storage capacity requirements as package cache may only be purged by a background job running 
      on a fixed 1-hour interval.
      --&gt;
      &lt;add key="enableFileSystemMonitoring" value="true" /&gt;
  &lt;/appSettings&gt;
  &lt;system.serviceModel&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
  &lt;/system.serviceModel&gt;
  &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
      &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /&gt;
      &lt;/dependentAssembly&gt;
      &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" /&gt;
      &lt;/dependentAssembly&gt;
      &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" /&gt;
      &lt;/dependentAssembly&gt;
      &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" /&gt;
      &lt;/dependentAssembly&gt;
      &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" /&gt;
      &lt;/dependentAssembly&gt;
      &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" /&gt;
      &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
  &lt;/runtime&gt;
  &lt;/configuration&gt;
  &lt;!--ProjectGuid: DE6B2A91-48E9-4ADF-BE86-55AD27F6EB1B--&gt;
  </code></pre>
  
  <p>So... does anyone has any other hints in how to fix this?
  Thank you</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Here is an output of the TraceLogging of the IIS (Version 8.5 on a Server 2012 R2):</p>
  
  <pre><code>&lt;EventData&gt;
  &lt;Data Name="ContextId"&gt;{80000457-0002-FC00-B63F-84710C7967BB}&lt;/Data&gt;
  &lt;Data Name="ModuleName"&gt;StaticFileModule&lt;/Data&gt;
  &lt;Data Name="Notification"&gt;128&lt;/Data&gt;
  &lt;Data Name="HttpStatus"&gt;405&lt;/Data&gt;
  &lt;Data Name="HttpReason"&gt;Method Not Allowed&lt;/Data&gt;
  &lt;Data Name="HttpSubStatus"&gt;0&lt;/Data&gt;
  &lt;Data Name="ErrorCode"&gt;2147942401&lt;/Data&gt;
  &lt;Data Name="ConfigExceptionInfo"&gt;&lt;/Data&gt;
  &lt;/EventData&gt;
  </code></pre>