I have three webapis (microservices: m1,m2,m3) developed using .NET 8 using Visual Studio 2022. All the three microsercices are hosted in three different Azure app services under the same app service plan. When executed locally I’m able to access the respective api controller methods for each microservice without any issue. But on accessing the api endpoints that are hosted in Azure app service I receive a 404. There are routing rules configured at AppGateway level. For example any incoming route contains /m1/* it gets redirected to the AppService hosting m1 web api and same rule applies to other microservices.

Browse to the Swagger URL : https://demoapi.com/m1/docs/index.html and I see the swagger page getting loaded. Now on testing endpoint method I see a 404 response.

https://demoapi.azurewebsites.net/m1/api/m1/testmethod.

Here I notice that the request is not going to the actual endpoint and instead of that it is going to url having domain : demoapi.azurewebsites.net

Here goes the setting at AppGateway level:

“ExternalUrl”: “demoapi.com”,
“SslCertificate”: “test-wildcard”,
“BackendUrl”: “demoapi.azurewebsites.net”,
“OverrideHostname”: “demoapi.azurewebsites.net”,
“OverrideBackendPath”: “/”,

Can anyone please help me here by providing their guidance