I am trying to get applicationInitialization running in an ASP.Net Web Forms application. I have worked through many SO threads to no success.
The application initialization module seems to work because the browser shows the Startup.html page I have specified in the configuration.
My Web.config looks like this:
<applicationInitialization remapManagedRequestsTo="Startup.html" skipManagedModules="true" doAppInitAfterRestart="true">
<add initializationPage="/AppInit.aspx" />
</applicationInitialization>
Problem: AppInit.aspx never gets called.
The applicationHost.config seems to be properly set up:
<application path="/" applicationPool="myPool" preloadEnabled="true">
<virtualDirectory path="/" physicalPath="C:\ASP Sites\MySite" />
</application>
- StartMode is set to AlwaysRunning
- The AppInit.aspx page can be called manually
- No rewrite rules are present
I can't find a reason why this isn't working.
Also: should this work in local DEBUG mode via Visual Studio as well?