IIS 7 and Above
Application Initialization Module
No request to initialization page issued on app pool recycle.
Last post May 06, 2016 06:40 PM by t0ta11ed74
Oct 25, 2012 03:51 PM|UncleZen|LINK
I have created a simple web application hosted under the Default Web Site. Please see the global and local setting below.
If I understand correctly the way the Application Initialization Module works, I am expecting IIS to issue a request to appinit.aspx (https://machinename/alwaysrunning/appinit.aspx) to initialize
the application. This is however never happening.
What is the purpose of the attribute initializationPage?
Any help with this would be greatly appreciated.
EDIT: I found out that when I disable the Require SSL option the module issues a request to appinit.aspx as expected. Now a simplified question: Does Application Initialization Module support SSL at all?
Global settings in the applicationHost.config file:
<add name="appinit" autoStart="true" startMode="AlwaysRunning">
<recycling logEventOnRecycle="Time, Requests, Schedule, Memory, IsapiUnhealthy, OnDemand, ConfigChange, PrivateMemory">
<periodicRestart requests="0" time="00:05:00">
<processModel identityType="NetworkService" idleTimeout="00:00:00" />
<application path="/alwaysrunning" preloadEnabled="true" applicationPool="appinit">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\alwaysrunnig" />
Local settings in application's web.config file:
<applicationInitialization remapManagedRequestsTo="splashscreen.htm" skipManagedModules="true" >
<add initializationPage="/appinit.aspx" />
Nov 16, 2012 08:51 AM|terridonahue|LINK
Is appinit.aspx the default page? I do not have a special page that I use for application initialization. I am using URL Rewrite rules to determine the status of the application and what page to serve based on that. What version of the .Net framework is
your application using? From what I understand, URL rewrite rules will need to be used rather than the web.config remapManagedRequestsTo setting if your application is running in a .Net 2.0 application pool (for either version 2.0 or 3.5).
Dec 13, 2012 02:20 PM|UncleZen|LINK
Thank you very much for responding to my question.
Here are my answers to your questions:
* appinit.aspx is not the default page.
* I am using .Net framework 3.5
I think that the issue that I am experiencing is not related to remapManagedRequestsTo attribute, which is used to specify the page that is displayed when the application is being initialized (e.g. a splash page). The problem that I am facing is that the page
appinit.aspx is not requested at all when SSL is required.
Dec 13, 2012 03:00 PM|terridonahue|LINK
Do you have a page that you could use that doesn't require SSL? The appinit application will produce an error if it tries to access a page that explicitly requires SSL.
Nov 23, 2014 11:45 AM|huangjinshe|LINK
What is that mean, what SSL module ? Can you tell me how fixed? because now my IIS not send request too. I don't use any SSL feature too.
Dec 01, 2014 05:46 PM|terridonahue|LINK
If you have SSL required for the website, application initialization does not work. Please create a new thread with the details of the issue you are having since we have not background to help you fix your issue.
May 06, 2016 04:38 PM|t0ta11ed74|LINK
I'm having this exact same problem and it's driving me mad. Everything is configured properly, everything works; I see the cache preload, etc. but I never see the request to the initialization page. It's my understanding this fake request should appear in
the IIS log.
I thought I had been on to something with SSL being the issue, since the application itself will try to redirect http to https. I tried implementing a rewrite rule as outlined here;
https://support.microsoft.com/en-us/kb/2843964 , and it seems to allow me to open the initialization page locally on port 80 and stays there without redirecting but I STILL never see the call to the
specified initialization page.
Does anyone have any pointers on where to look to troubleshoot this more? I also turned on FRT, and can see this happening in those logs; (Note, obscuring some info for security reasons, X'd out part IS the correct path to the page). Oddly, I don't see the
actual page name (default.aspx) in the URL here;
User-Agent: IIS Application Initialization Preload
The operation completed successfully.
This suggests it's working sort of, but that page still takes forever to load which indicates it really ISN'T being warmed up??...Ready to pull my hair out!
May 06, 2016 06:40 PM|t0ta11ed74|LINK
I think I've made some progress. FRT logs show it calling the default.aspx page now (still nothing in the IIS Log though).
However, the config allows you to specify multiple initialization pages, but I don't see anything for the other pages that have been added. As it is now, the default.aspx page still takes over two minutes to fully load in the browser after a reset. My goal
is to get this loading as quick as possible, but this feature is fighting me the whole way.