Application Initialization not making a request to the initialization page
This articles has been moved to its new home here: https://benperk.github.io/msdn/2013/2013-04-application-initialization-not-making-a-request-to-the-initialization-page.html
After setting it up the Application Initialization module with these parameters:
- autoStart = True
- startMode = AlwaysRunning
when IIS was restarted the W3WP worker process was started up and running just as expected. Figure 1 shows a Process Explorer Properties window.
Figure 1, Process Explorer showing running W3WP worker process
The problem was that a ‘simulated’ request was not sent to the worker process after a restart so my ASPX file was not compiled. Precompiling the file prior to the first request is a good idea and will certainly improve user experience for the first person to request that page after a restart.
I found that by setting the parameter preloadEnabled, shown in Figure 2, resulted in a pre-compilation of the file identified in the initializationPage parameter of my web.config. This web.config file exists in the root directory for the web site which I configure Application Initialization for.
Figure 2, configure the preloadEnabled attribute
Before I made the change I stopped the application pool which I had configured for Application Initialization. When I started the application pool again the W3WP worker process was indeed started as previous, but also the .NET Assemblies tab showed up in my Process Explorer as illustrated in Figure 3. As well, there was a compiled ASP.NET file created in my C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root directory.
Figure 3, Process Explorer with .NET Assemblies tab present
I write this article because I missed that very important piece of the original instructions and felt it was worth mentioning again. HTH.