Please note that the API template is a project template for creating a RESTful HTTP service, as @Andy mentioned, WebAPI project usually does not serving HTML pages.
If you really want to serve a index.html page in your WebAPI project, you can try:
1)create a wwwroot folder in your project and put index.html within it

2)call the UseStaticFiles method in Startup.Configure, which enables static files to be served
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//...
//your code here...
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
//...
For more information about serving static files, please check:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-5.0
it happened even with the default route, no static files.
You can try to access your API endpoint with your actual route that you configured, that might look like below.
https://xxx.azurewebsites.net/api/{controller_name}/{action_name?}
Or
https://xxx.azurewebsites.net/{controller_name}/{action_name?}
https://example.com/swaggerand see your controllers: learn.microsoft.com/en-us/aspnet/core/tutorials/… If you want a web site with HTML content, then don't choose the WebAPI option when creating your project.wwwrootdirectory or any static content what-so-ever. The default WebAPI project in Visual Studio 2019 is all you need.Turns out Azure required me to add an additional wwwroot with js, and css files, even when my project is configured to use endpoints onlyNever heard of requiring this additional wwwroot folder for API project on Azure.