I have a C# application that is built using the .NET Core Web API template. This works great locally and I can access the rest endpoints in my application.
For example /api/person/0
where 0
is the id
of a person.
The problem is with Azure. When I create an app service and use a github repository the app gets deployed. In the logs I see the following partial error:
Physical Path C:\home\site\wwwroot\api\gerecht\1
Azure thinks that my C# app is a simple website and tries to access the path as a physical file and not as an endpoint in my application. Why is Azure not accessing the endpoint?
Thanks
How did you deploy the application to Azure?
[Brute Force] You may want to use GitHub Action from inside Visual Studio for this.
I experience this in the past and that was how I solved it.
Alternatively, you could use the Azure CLI from inside the directory that contains your
.csproj
file.Official documentation here.