title: ASP.Net Web API not starting
body: <p>I'm working on an app using ASP.NET Web API 2. </p>
  
  <p>The issue is that every call to one of the exposed APIs returns a 404.</p>
  
  <p>Explanation:
  The application is an angular app hosted inside a ASP.NET MVC 5 site. </p>
  
  <p>The angular app is static, those files are correctly returned to the client. </p>
  
  <p>So I found plenty of possible solutions:
  <a href="https://stackoverflow.com/questions/20621825/asp-net-mvc-webapi-404-error">ASP.NET MVC WebAPI 404 error</a> and
  <a href="https://stackoverflow.com/questions/16812995/all-requests-to-asp-net-web-api-return-404-error">All requests to ASP.NET Web API return 404 error</a>
  and much more</p>
  
  <p>Most of those advise to set <code>runAllManagedModulesForAllRequests="true"</code> which I did.</p>
  
  <p>The very strange thing is that if I follow the tracing thing (<a href="http://www.asp.net/web-api/overview/testing-and-debugging/tracing-in-aspnet-web-api" rel="nofollow noreferrer">http://www.asp.net/web-api/overview/testing-and-debugging/tracing-in-aspnet-web-api</a>) NOTHING at all is being logged.</p>
  
  <p>So, that's why I have the feeling that web API is not registered properly.</p>
  
  <p>So, here is my web.config file in the case it can help. I stripped out the information related to WAAD as it contained passwords and sensitive data but I don't think it might cause problem.</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
      &lt;section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
  
    &lt;/configSections&gt;
  
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
  
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users="?" /&gt;
      &lt;/authorization&gt;
  
      &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Account/SignIn" timeout="2880" /&gt;
      &lt;/authentication&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;handlers&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /&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;!--&lt;add name="AttributeRouting" path="routes.axd" verb="*" type="AttributeRouting.Web.Logging.LogRoutesHandler, AttributeRouting.Web" /&gt;--&gt;
  
  
        &lt;!--&lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;--&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" preCondition="integratedMode,runtimeVersionv4.0" /&gt;&lt;/handlers&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
        &lt;remove name="FormsAuthentication" /&gt;
        &lt;add name="WSFederationAuthenticationModule" type="System.IdentityModel.Services.WSFederationAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" /&gt;
        &lt;add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" /&gt;
      &lt;/modules&gt;
    &lt;/system.webServer&gt;
  
  
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /&gt;
        &lt;/dependentAssembly&gt;
  
  
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="5.0.0.0-6.0.0.0" newVersion="5.1.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Any suggestions? </p>