Share via

Azure Web App Api Bug: breaks for multiple reasons

T-CROC 1 Reputation point
Jul 18, 2020, 4:17 PM

There are multiple things that are breaking Azure Web Apps .NET Core 3.1 LTS. Another user had the same problem on Stack Overflow and I posted an answer pointing out the problems we had and the solutions / workarounds. A few of them seem like bugs. Here is the link as I don't want to recreate the lengthy post: https://stackoverflow.com/a/62970620/9733262.

What do you make of this? I don't think creating a Web App should be this sensitive and fragile. It took quite a bit of time for us to get it working as we just kept running into one problem after the other. These problems occur with the default WeatherForecast API project that is created when creating a new project.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,054 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 29,296 Reputation points Microsoft Employee
    Jul 21, 2020, 10:33 PM

    Thanks for the feedback @TCROC-7854. I can identify your frustration, appreciate your feedback, and would like to help anyway possible.

    I did confirm that File -> New -> ASP.NET Core / Web API as well as dotnet new webapi does create a project where the API WeatherForecastController inherits from ControllerBase. I also confirmed (see images below) that creating the app service through Visual Studio (16.7.0 Preview 3.1) and using <TargetFramework>netcoreapp3.1</TargetFramework> does create the app service as NETCORE. I used East US and East US 2 to verify these so please let me know what region this didn't work for you.

    13291-2020-07-21-17-22-22-ryhillwebapibasic-configuratio.png

    13148-2020-07-21-17-23-20-ryhillwebapibasic-console-micr.png

    I also didn't have any issue with getting to the API https://<my-app-name>.azurewebsites.net/weatherforecast as it returned the expected json without needing to turn off Always On. Toggling this setting wouldn't have any effect on the startup of the dotnet new webapi app service. You also should be able to select .NET Core 3.1 when creating the app in the portal and verify in the console (pictured above) or in Kudu and running dotnet --info.

    13282-2020-07-21-18-29-58-create-web-app-microsoft-azure.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.