Search code examples
.netazureazure-web-app-serviceazure-appservice

Trouble configuring Azure app service from publish in Visual Studio, can't access endpoints


I am trying to post a simple .net 5 API, no front end, to my azure app service. I published from Visual studio to the existing app service. When I publish, it produces all the .dlls and .exe to the wwwroot folder. When I try to access my endpoints, I'm getting a 500 error.

wwwroot folder with all posted files.

path mapping in configuration


Solution

  • Try to log the error first and send post the error message for further analysis. To generate the error log follow the below staps -

    Go to the SCM site of your app service - https://yoursitename.scm.azurewebsites.net or from the navigation blade use App Service Editor

    • Navigate to the application deployment directory and find the web.config file
    • Set stdoutLogEnabled to true change the
    • stdoutLogFile path to point to the logs folder (for ex:.\logs\stdout)
    • Save the web.config file and make a request to the app
    • Navigate to the d:\home\LogFiles file, it should give a good idea of what is causing 500 error.

    A detailed steps can be found in this link -- https://learn.microsoft.com/en-us/answers/questions/202561/azure-web-app-net-core-start-up-error-how-to-find.html