0

According to this answer on another question, ApplicationInitialization can be used to control the endpoint that the "Always On" feature for Azure's App Services uses. However, I cannot find documentation on this. All of the docs I can find on ApplicationInitialization only talks about using it to specify pages for warmup prior to putting the instance of the site into the load-balancing pool (note the plurality of "pages"). But I cannot find anything to specify the single endpoint that the Always On feature uses.

My desired goal is to have the Always On feature ping a hearbeat page of sorts with a custom querystring (i.e. a key so it's somewhat locked down).

How can I use ApplicationInitialization to specify the custom page that the "Always On" feature hits?

Jaxidian
  • 13,081
  • 8
  • 83
  • 125

1 Answers1

0

AlwaysOn cannot be used to specify a single endpoint. It will always hit root url.

But you can indeed specify AppInit parameter in your web.config like so:

<system.webServer>  
  <applicationInitialization >  
    <add initializationPage="/mycustompage" hostName="host.azurewebsites.net"/>  
  </applicationInitialization>  
</system.webServer>   

You can read more about this feature here: http://ruslany.net/2015/09/how-to-warm-up-azure-web-app-during-deployment-slots-swap/

And on Azure feedback website: https://feedback.azure.com/forums/169385-web-apps/suggestions/6972595-application-initialization-to-warm-up-specific-pag

John
  • 29,788
  • 18
  • 89
  • 130
RAS
  • 3,375
  • 15
  • 24
  • So are you saying that Ranjith Ramachandra was incorrect in the comment stating that appInit can specify the address for AlwaysOn? – Jaxidian Mar 14 '17 at 05:55
  • @Jaxidian, I don't think he stated that. He also mentioned in his post this line: "After that, if the worker process crashes, alwaysOn makes sure that it comes back up. *You cannot control the endpoint that it hits.*" – RAS Mar 14 '17 at 06:20
  • I guess I was putting more weight into his comments that appeared 2 years after his answer text (given that Azure's ApplicationInitialization seems to have been modified in early 2016). – Jaxidian Mar 14 '17 at 13:53