title: Requested resource does not support http method "PUT"
body: <p>I'm using AttributeRouting with my Web API (MVC 4).</p>
  
  <p>Why does this work?</p>
  
  <pre><code>    [AcceptVerbs("PUT")]
      [PUT("api/v1/tokens/current")]
      public MemoryToken UpdateToken([FromBody] DeviceTokenViewModel viewModel)
      {...}
  </code></pre>
  
  <p>And this one does not?</p>
  
  <pre><code>    [PUT("api/v1/tokens/current")]
      public MemoryToken UpdateToken([FromBody] DeviceTokenViewModel viewModel)
      {...}
  </code></pre>
  
  <p>Error message: The requested resource does not support http method "PUT". 
  Why do I have to explicitly accept the PUT verb?</p>
  
  <p>I'm just confused because something similar with POST works just fine (I don't have to specify the accepted verbs):</p>
  
  <pre><code> [POST("api/v1/tokens")]
   public MemoryToken CreateToken()
   {...}
  </code></pre>
  
  <p>From various other posts I believe it has to do with the setting in my web.config. The web server section currently looks like this:</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;validation validateIntegratedModeConfiguration="false" /&gt;
  &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
  &lt;handlers&gt;
    &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /&gt;
    &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /&gt;
    &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
    &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /&gt;
    &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /&gt;
    &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
    &lt;add name="AttributeRouting" path="routes.axd" verb="*" type="AttributeRouting.Web.Logging.LogRoutesHandler, AttributeRouting.Web" /&gt;
  &lt;/handlers&gt;
  </code></pre>
  
  <p></p>
  
  <p>I tried a couple things like removing WebDav and stuff. But nothing worked so far (unless explicitly allowing the PUT verb in the annotation).</p>
  
  <p>Oh, I am using Visual Studios built-in development server. </p>
  
  <p>Thanks guys!</p>