Asp.net Application Initialization not hitting init page

88 views Asked by At

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>
  1. StartMode is set to AlwaysRunning
  2. The AppInit.aspx page can be called manually
  3. 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?

0

There are 0 answers