IIS 8.5 - Application initialization not working

It turned out to be a whole load of settings which all had to be correct. You go through all of the steps to install the relevant components and make the various config changes as per this link: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization

The key part which was missing for me was an instruction in the Web.config as below. I had it going to just "/Login" which is a valid route, but as soon as I switched it to "/[Controller]/[Action]" it worked.

The advantage of this route is that you can create a custom action which will also hit the database (initialising Entity Framework), and perform any other slow initialisation you wish. For me, I just read a record out of a DB table, so I get ASP.NET auto-starting, and also save the few seconds it takes to warm up EF too :)

<system.webServer>
  <applicationInitialization doAppInitAfterRestart="true" skipManagedModules="false">
      <add initializationPage="/Login/WarmUp" />
    </applicationInitialization>
</system.webServer>

Try Application Initialization setup:

I had similar issues and tried very hard with IIS 8.5 Windows Server 2012 R2. Everything in the IIS was set correctly after referring to so many sites however had missed the Application Initialization setup. Refer to the below link, Setup section.

enter image description here

https://www.iis.net/configreference/system.webserver/applicationinitialization