locked
initializationPage not working correctly IIS 7.5 RRS feed

  • Question

  • User1786436407 posted
    I installed this yesterday and am fairly convinced that the initializationPage aspect is not working correctly. My Server has 6 sites that I intend to use this for. All are running in their own application pool and in in applicationHost.config are configured identically as per the example below.
    
                <site name="mysite1.example.com" id="3">
                    <application path="/" applicationPool="mysite1.example.com" preloadEnabled="true">
                        <virtualDirectory path="/" physicalPath="C:\Websites\MySite1.Demo" />
                    </application>
                    <bindings>
                        <binding protocol="http" bindingInformation="*:80:mysite1.example.com" />
                    </bindings>
                </site>
    
    
    With the application pools set up as follows
                <add name="mysite1.example.com" startMode="AlwaysRunning" managedPipelineMode="Integrated" managedRuntimeVersion="v4.0" />
    
    
    On only one of these sites I have set up an initializationPage calling an MVC3 controller action in the web.config.
    <applicationInitialization remapManagedRequestsTo="Startup.htm" skipManagedModules="true" >
    <add initializationPage="/Application/Initialise/" />
    </applicationInitialization>
    
    
    On that site I have put logging in for the Application_Start, Application_End and Initialise code. I am finding that setting the startMode="AlwaysRunning" means that after the app pool is recycled the application starts up again but the Initialise code never gets called at this point. Instead it only gets called on the first time I make a request to the site from a web browser. Strangely I do see that on at least one of the other sites which I have **not** set anything up in the web.config for it is doing some warm up! That site (still in development) happens to have code to send an email when accessed. And I can see periodic emails come through with HTTP_USER_AGENT:IIS Application Initialization Preload. Nothing is recorded in the IIS logs for that site / user agent however so I am unsure if similar warm up is being carried out for any of the other sites. Are there known issues with running this on multiple web sites? Is there any way of configuring any logging on it so I can try and see what the problem is exactly?
    Saturday, October 27, 2012 9:12 AM

All replies

  • User-1091411227 posted

    Hi any luck fixing this problem I have the same thing with mine?

    Thursday, December 12, 2013 9:18 AM
  • User958873291 posted

    This doesn't work because applicationInitialization is only available for IIS 8+.

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

    Monday, December 14, 2015 9:40 PM
  • User-2064283741 posted
    Application warmup module is available for 7.5
    You have to download it.
    http://www.iis.net/downloads/microsoft/application-initialization
    Monday, December 14, 2015 10:00 PM
  • User958873291 posted

    MartinSmithh already has this installed.  Originally I thought it was because the <applicationInitialization /> tag was ignored in the web.config with IIS 7.5 but it turns out that is indeed used, just takes a lot longer to to do the fake http post compared to IIS 8.0+.

    Tuesday, December 15, 2015 11:41 AM