locked
Application initialisation on IIS 10, application wide Preload, Alwaysrunning, Web.config. how to. RRS feed

  • Question

  • User2110873642 posted

    I have found that for the website to preload correctly I need 3 things set.

    1.  Application Pool needs the value Start Mode set to AlwaysRunning

    2. the Web Application needs the value Preload Enabled set to True

    At this point I would have thought the sites would preload correctly but they do not. I have also needed to

    3. Configuration Editor for the Web Application > navigate to Section: system.webServer/applicationInitialization

    and set doAppInitAfterRestart to True and also each aspx file that you want to have preloaded listed in the collection.

    If an aspx file is not listed in that collection it will not be preloaded.

    how can i apply application wide preload. preferably only by web.config.

    Monday, March 16, 2020 3:08 PM

All replies

  • User1535942433 posted

    Hi fazioliamboina,

    Accroding to your description,I suggest you could do these:

    1.Install the Windows feature Application Initialization (Web-AppInit)

    2.Set the IIS app pool Start mode = AlwaysRunning

    3.Set the IIS application Preload Enabled = true

    4.Add to the application web.config

    5.Recycle app pool

    6.Check that the app initialized.

    Besides:The <applicationInitialization> element was not modified in IIS 10.0.

    More details,you could refer to below article:

    https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-application-initialization

    Best regards,

    Yijing Sun

    Tuesday, March 17, 2020 5:05 AM
  • User2110873642 posted

    thanks for your post.

    however you missed a part of the question.

    you mentioned in point 4) Configuration Editor for the Web Application > navigate to Section: system.webServer/applicationInitialization and set doAppInitAfterRestart to True and also each aspx file that you want to have preloaded listed in the collection.

    If an aspx file is not listed in that collection it will not be preloaded. how can i apply application wide preload without listing each aspx file?

    Tuesday, March 17, 2020 12:32 PM
  • User1535942433 posted

    Accroding to your description,as far as I think,you need to first manual add the list of whole web app directionary.

    More details,you could refer to below codes:

    <applicationInitialization
        remapManagedRequestsTo="Startup.htm" 
        skipManagedModules="true" >
      <add initializationPage="/default.aspx" />
    </applicationInitialization>

    Best regards,

    Yijing Sun

    Wednesday, March 18, 2020 7:45 AM