How do I get the details of an Error 500 for an Azure Web App?

让人想犯罪 __ 提交于 2019-12-04 04:35:40

For MVC 6 you need to add a web.config file to the wwwroot folder with the following:

<configuration>
   <system.web>
      <customErrors mode="Off"/>
   </system.web>
</configuration>

That will add the markup to the deployed web.config file, and give you detailed errors. See http://docs.asp.net/en/latest/fundamentals/diagnostics.html#http-500-errors-on-azure for more details.

First, you have to enable LOG files on Azure.

In MVC Core you do that by setting stdoutLogsEnabled=true in web.config -> ->

Then you go to Azure App Service console, Click on Diagnostics Logs under MONITORING Category.

There you have FTP link, where you have your LOG files stored.

Open it and you will see a detailed error. Dont forget to stop your App Service Server before you try to open LOG file, otherwise it won't be accessible.

Hope that helps you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!