ApplicationInitialization expected Url path format

49 views Asked by At

I have a web app in Azure that I would like to warm up after deployment. My site is in a virtual folder, call it

/mysite

In the web.config applicationInitialization section, are the URLs expected to include the full path (relative to the domain) to the page to warm up, or is it a relative path from the root of the site?

In other words, would I want to warm up

<add initializationPage="/" />

or

<add initializationPage="/mysite" />

Also, can I put the Application Root Operator in these paths e.g.

 <add initializationPage="~/" /> 
1

There are 1 answers

0
Sina Salam On BEST ANSWER

Yes, the URL path is expected for the Initialization Page.

With what you have done so far, you should warm up your site using:

<add initializationPage="/mysite" />

This will help to send warm up request to the "mysite" Virtual Directory.

Also, in using Application Root Operator (~), normally useful in ASP.NET root paths. But, in the context of the applicationInitialization section, using ~ is not necessary and may not work as expected.

So, in summary, use the relative path from the root of your application, and do not use the Application Root Operator:

<add initializationPage="/mysite" />

Ensure you test warm-up request. Everything should be cool.