Apologies for the delay and any frustration with this issue.
Just to clarify, are you leveraging Azure App service Windows or Linux app?
Are you using the default parent base image base or different custom Docker image to run your ap?
Kindly ensure that the site deployment files are available D:\home\site\wwwroot\ directory. By default, the port 80 and 8080 is accessible (exposed ports).
Yes, you can simply navigate to http://<app_name>.azurewebsites.net/api/test to see your deployed API.
Kindly use app setting WEBSITES_PORT to set the port for your own docker image while for blessed images use PORT environment variable as the listening port.
In your application, please use the PORT or WEBSITES_PORT (as applicable) environment variable as the main web server’s listening port, instead of using a hardcoded port number ( on app start-up on locahost:5000). The PORT environment variable is automatically set by App Service platform at startup time.
As mentioned, you could try these ways:
- Use the EXPOSE instruction in your Dockerfile to expose port 5000.
- Use the WEBSITES_PORT app setting with a value of "5000" to expose that port.
You can also always inspect the log files from the browser at https://<app-name>.scm.azurewebsites.net/api/logs/docker and leverage App Service diagnostics to fetch more details on the issue. To access App Service diagnostics, navigate to your App Service app in the Azure portal. In the left navigation, click on Diagnose and solve problems- From there, run the “Availability & Performance” & “Diagnostic Tools” for investigation.
If feasible restart the WebApp and then check to see if that helps.
Checkout this documentation ‘Tutorial: Host a RESTful API with CORS in Azure App Service’ for a detailed access steps.