12
votes

I tried using Application Initialization on both Win 2008 R2, IIS 7.5 and Windows 7, IIS 7. Its not working as expected. I downloaded the x64 version.

Source from applicationhost.config:

<applicationPools>     
    <add name="MyApp" autoStart="true" 
        startMode="AlwaysRunning" 
        managedRuntimeVersion="v4.0"> 
</applicationPools>

<sites> 
    <site name="Default Web Site" id="1" serverAutoStart="true">
        <application path="/MyApp" applicationPool="MyApp"
            preloadEnabled="true">
    </site>
</sites>

Application web.config file:

<system.webServer>
    <applicationInitialization remapManagedRequestsTo="loading.html" 
        skipManagedModules="true">
        <add initializationPage="/default.aspx" />
    </applicationInitialization>
</system.webServer>

Its not having any effect. When I restart IIS and loaded the URL in browser (localhost/.../default.aspx) it didnt showed the loading.html page, neither it looks like the appPool is always running\warmed up.

Also, it didnt showed the multiple instances of w3p process. Its not working.

A small video for configuring Application Initialization module on Windows 7, IIS 7 or Windows 2008 R2, IIS 7.5 would be helpful, because maybe I have missed something.

3

3 Answers

5
votes

We've found that when it is installed it causes a HTTP 500 error on the first request to the web site when the app pool has been restarted on Windows Server 2008 R2 with IIS 7.5

Pretty disappointing, I was hoping that this would be a good module to use but it does seem flaky and we've stopped using it

2
votes

Try this tool:

Application Initialization UI for IIS 7.5

It worked for me (I needed to activate a Web application hosting a WCF service that used net.Tcp, the first call to the service would not activate it since it was not coming on top of the HTTP protocol...so I needed something external to start it up and execute some custom code within App_… event handlers)

0
votes

I couldn't get it to work either, and my issue was that I was attempting to manually modify "C:\Windows\System32\inetsrv\config\applicationHost.config" using a 32-bit editor (notepad++ in my case) and it was actually opening "C:\Windows\SysWOW64\inetsrv\Config\applicationHost.config", which doesn't apply to my 64-bit site/pool. A side effect that led me to that conclusion was that the file in notepad++ never matched what I was seeing in the IIS Manager, which led me to find IIS 7.5 applicationHost.config file is not being updated.

Once I opened it using a 64-bit editor (e.g. sublime text 3), I started to see the changes as described in the IIS Manager, and after making the prescribed Application Initialization changes to my application pool and site, everything started to work.

I suspect the UI tool described in an above answer probably worked for others since it runs as a 64 bit application and therefore updates the correct applicationHost.config file.