Show ASP.NET 5 error page in Azure web app

前端 未结 7 488
猫巷女王i
猫巷女王i 2020-12-14 17:04

I am getting a 500 Internal Server Error when deploying our ASP.NET 5 web application to an Azure Web App.

How do I get the details and stacktrace f

7条回答
  •  情深已故
    2020-12-14 17:19

    Your startup.cs has some runtime code that isn't playing nice with Azure. Force the developer friendly exception page to render by moving app.UseDeveloperExceptionPage(); to the beginning of the Configure(...). Publish updated code to Azure, reload home page and exception will now be helpful.

    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
         {
              app.UseDeveloperExceptionPage();
          ...
         }
    

提交回复
热议问题