Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring an Azure Website with application warmup

I have an Azure Website developed for which I would like to reduce the initial loading time. On a regular ASP.NET site I would configure the Application Initialization IIS module, but with Azure Websites direct IIS configuration is not possible.

The website is running in reserved mode if that makes any difference.

like image 509
Ole-Marius Moe-Helgesen Avatar asked Aug 28 '12 07:08

Ole-Marius Moe-Helgesen


2 Answers

Actually, Application Initialization module is installed by default for Azure Web Apps. You can directly configure it from either your web.config file or through apphost.config XDT. Just stick something like below in a web.config in the root of your web app.

<system.webServer>
  <applicationInitialization
    doAppInitAfterRestart="true"
    skipManagedModules="true">
    <add initializationPage="/default.aspx" hostName="myhost"/>
  </applicationInitialization>
</system.webServer>
like image 124
NazimL - MSFT Avatar answered Nov 05 '22 05:11

NazimL - MSFT


Application Initialization is not supported with Windows Azure Websites. because it is a native module and Windows Azure Websites does not allow configuring native modules via web.config.

Alsom the content for Windows Azure Websites are physically located at a centralized location and from there they loaded and executed to webservers. While shared instance gets a slice of host VM, versus reserved instance get a full host VM to run your web applications, in both cases the website application is coming from same centralized located so it does not matter if you have reserve instance to get Application Initialization working.

Application Initialization is necessary for your application and your websites is running in reserve mode, you can use Azure VM or Windows Azure Web Role to have it working.

like image 27
AvkashChauhan Avatar answered Nov 05 '22 06:11

AvkashChauhan