title: ASP.NET MVC WebAPI 404 error
body: <p>I have an asp.net web forms application running under v4.0 integrated mode.</p>
  
  <p>I tried to add an apicontroller in the App_Code folder. </p>
  
  <p>In the Global.asax, I added the following code</p>
  
  <pre><code> RouteTable.Routes.MapHttpRoute(
        name: "DefaultApi",
        routeTemplate: "api/{controller}/{id}",
        defaults: new { id = System.Web.Http.RouteParameter.Optional }
   );
  </code></pre>
  
  <p>When I tried to navigate to the controller at <code>http://localhost/api/Value</code>, I get the 404 error.</p>
  
  <p>The extensionless url is configured in the handler section. I have forms and anonymous authentication enabled for the website. </p>
  
  <p>ExtensionLess url is configured for '*.'</p>
  
  <p>When I hit the url for controller, the request is handled by StaticHandler instead of ExtensionlessUrlHandler-Integrated-4.0. </p>
  
  <p>I have no clue now why the system will throw the error as shown in the image below.
  <img src="https://i.stack.imgur.com/Y9s0C.png" alt="Error"></p>