title: WebAPI Routes not being recognized on Azure
body: <p>I'm trying to deploy a WebAPI project to Azure.</p>
  
  <p>It works locally. When I <code>Publish</code> it to Azure, I get 404 on the controller routes. </p>
  
  <p>Looking at the logs, I see the routes are being handled as static files, instead of going through my controllers.</p>
  
  <p><code>
  Module     IIS Web Core
  Notification       MapRequestHandler
  Handler    StaticFile
  Error Code     0x80070002
  Requested URL      http://xxxxx:80/api/studies
  Physical Path      D:\home\site\wwwroot\api\studies
  Logon Method       Anonymous
  Logon User     Anonymous
  </code></p>
  
  <p>My Global.asax is:</p>
  
  <pre><code>    protected void Application_Start()
      {
          GlobalConfiguration.Configure(WebApiConfig.Register);
      }
  </code></pre>
  
  <p>And my WebApiConfig.Register is:</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>I've looked at similar questions and tried tweaking my Web.config to no avail. It currently looks like this (relevant part only):</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;httpErrors existingResponse="PassThrough"/&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
      &lt;/modules&gt;
      &lt;handlers&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="*" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
      &lt;/handlers&gt;
   &lt;/system.webServer&gt;
  </code></pre>
  
  <p>By the way, I'm on Entity Framework 6 and not using MVC, just straight up WebAPI.</p>