0

We have a .Net MVC application that has a controller with a HttpPost Method type and the application is hosted in Azure.

When the application is Idle for 30 minutes and we click on submit button we could see the request being sent to server as HttpGet and there is an exception as unknown method.

I tried looking at app insights traces and there is no issue from the Azure end.

Controller class doesn’t have any method with type HttpGet for the save method.

Where am going wrong here?

Parthasarathy
  • 19
  • 1
  • 5

1 Answers1

0

May there be not any wrong with you, just use a low tier of Azure WebApp without enable the feature Always on like F1 Free Tier, as the figure below, to enable the Always on feature to avoid your webapp asleep and awake up by a request after idle.

enter image description here

If you can not enable it, please first follow the tips on Azure portal to scale up the tier of your app service plan, then to do it again.

According to the offical document Configure an App Service app in the Azure portal, as the quote and figure below, because Azure will idle your app without Always on enabled to reduce the infrastructure resource cost for no traffic.

Always On: Keep the app loaded even when there's no traffic. It's required for continuous WebJobs or for WebJobs that are triggered using a CRON expression.

enter image description here

Peter Pan
  • 23,476
  • 4
  • 25
  • 43