locked
Using Appcmd to set preloadEnabled=true RRS feed

  • Question

  • User-1116321515 posted

    Hi Guys,

    I need to set the following options in applicationhost.config for a given virtual application on a Windows 2008 R2 server,

    AlwaysRunning = True

    AutoStart = True

    preloadEnabled = True

    I am handling the first two settings with the command :

    C:\windows\system32\inetsrv\APPCMD.exe set apppool testappPool /autoStart:true /startMode:AlwaysRunning

    the last option I am having troubles setting, I believe I could get it set using appcmd set config, the closest I have got so far is :

    .\appcmd.exe set config "testwebsite/testvdir" -section:system.applicationHost/sites /+"[preloadEnabled ='true']" /commit:apphost

    but it throws the error:

    ERROR ( message:Unknown attribute " preloadEnabled ". )

    any help would be greatly appreciated.

    Regards Alex

    Wednesday, February 27, 2013 1:35 AM

Answers

  • User-736483138 posted

    Hi Alex,

     

    Have you installed the ApplicationInitialization module? preloadEnabled requires that module to be installed.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, February 27, 2013 8:12 AM
  • User-1116321515 posted

    Ah ok, I was not aware of this component, thank you I have installed it on the server and rebooted, for any one else wanting to set preloadEnabled through appcmd the command is :

    appcmd set app "websitename/vdirname" /preloadEnabled:true

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, February 27, 2013 8:08 PM

All replies

  • User-736483138 posted

    Hi Alex,

     

    Have you installed the ApplicationInitialization module? preloadEnabled requires that module to be installed.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, February 27, 2013 8:12 AM
  • User-1116321515 posted

    Ah ok, I was not aware of this component, thank you I have installed it on the server and rebooted, for any one else wanting to set preloadEnabled through appcmd the command is :

    appcmd set app "websitename/vdirname" /preloadEnabled:true

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, February 27, 2013 8:08 PM