Quantcast
Viewing all articles
Browse latest Browse all 27852

initializationPage not working correctly IIS 7.5

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?

Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>