title: HTTP PUT is not working in ASP.NET Web API
body: <p>I have simple Web API controller in which <code>GET</code> and <code>POST</code> are working but <code>PUT</code> and <code>DELETE</code> is not working. Server throws <code>The requested resource does not support http method 'PUT'</code> error when accessing PUT and DELETE
  Here is how <strong>web.config</strong> looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;configuration&gt;
          &lt;configSections&gt;
              &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
          &lt;/configSections&gt;
          &lt;system.web&gt;
              &lt;compilation debug="true" targetFramework="4.5.2"&gt;
                  &lt;assemblies&gt;
                      &lt;add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
                  &lt;/assemblies&gt;
              &lt;/compilation&gt;
              &lt;httpRuntime targetFramework="4.5.2" /&gt;
              &lt;httpModules&gt;
                  &lt;add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" /&gt;
              &lt;/httpModules&gt;
          &lt;/system.web&gt;
          &lt;system.webServer&gt;
              &lt;validation validateIntegratedModeConfiguration="false" /&gt;
              &lt;modules&gt;
                  &lt;remove name="ApplicationInsightsWebTracking" /&gt;
                  &lt;add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" /&gt;
              &lt;/modules&gt;
              &lt;handlers&gt;
                  &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;      
                  &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
              &lt;/handlers&gt;
          &lt;/system.webServer&gt;
          &lt;runtime&gt;
              &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
                  &lt;dependentAssembly&gt;
                      &lt;assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
                      &lt;bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /&gt;
                  &lt;/dependentAssembly&gt;
                  &lt;dependentAssembly&gt;
                      &lt;assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
                      &lt;bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" /&gt;
                  &lt;/dependentAssembly&gt;
              &lt;/assemblyBinding&gt;
          &lt;/runtime&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.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /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.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&amp;quot;Web\&amp;quot; /optionInfer+" /&gt;
              &lt;/compilers&gt;
          &lt;/system.codedom&gt;    
      &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Code for Global.asax</strong></p>
  
  <pre><code>protected void Application_Start(object sender, EventArgs e)
  {
      GlobalConfiguration.Configure(WebApiConfig.Register);
  }
  </code></pre>
  
  <p><strong>Code for Web API Configuration</strong></p>
  
  <pre><code>public static void Register(HttpConfiguration config)
  {
      config.MapHttpAttributeRoutes();
      config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{Id}",
              defaults: new { Id = RouteParameter.Optional }
      );
  }
  </code></pre>
  
  <p><strong>And the controller has...</strong></p>
  
  <pre><code>public class GroupsController : ApiController
  {
      [System.Web.Http.HttpPut]
      public ActionResult Put(int Id, [FromBody]Group NewGroup)
      {
          //some code here
      }
  }
  </code></pre>
  
  <p>I have also looked into online resource but none of those are helping out...
  <a href="https://stackoverflow.com/questions/14321988/http-put-not-allowed-in-asp-net-web-api">here</a> and <a href="https://serverfault.com/questions/93424/how-to-enable-put-and-delete-in-iis7">here</a></p>
  
  <p>I'm trying to make this API working in developer machine (IIS express/compact one that ships with Visual Studio).</p>