We have a lot of traffic to our website, and when we deploy an update to our app the app service will restart. This takes around 4-5 minutes to restart and this "App service unavailable" message is shown to every user visiting the page.
Using app_offline.htm in the wwwroot does not work.
Is there any way to serve a static html file when restarting your app service? Or when it is offline?
CodePudding user response:
Create one default html file with the content which you want to show.
In web.config file , in <system.webServer> tag add the below snippet
<system.webServer>
<defaultDocument>
<files>
<clear/>
<add value="index.html"/>
</files>
</defaultDocument>
<system.webServer>
Publish your web Application and check once.
- To edit the existing web.config , Go to kudu console in Azure Portal and edit.
OR
We can set Default Documents option in Azure Portal.
- After deploying your application to Azure.
- Go to Azure Portal => Your Application => Configuration =>Default Documents

