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.
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
web.config
filestdoutLogEnabled
to true change thestdoutLogFile
path to point to the logs folder (for ex:.\logs\stdout)web.config
file and make a request to the appd:\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