在 Azure Web 应用中显示 ASP.NET 5 错误页面 [英] Show ASP.NET 5 error page in Azure web app

查看:11
本文介绍了在 Azure Web 应用中显示 ASP.NET 5 错误页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将 ASP.NET 5 Web 应用程序部署到 Azure Web 应用程序时,我收到 500 内部服务器错误.

如何获取此异常的详细信息和堆栈跟踪?

我做了以下但没有运气:

  • 在启动时使用诊断错误页面:

    app.UseErrorPage();

  • 在 Azure 门户中设置 ASPNET_ENV:

使用 DNX 测试版 6.

解决方案

根据

这是他们包含的内容:

尝试解析 D:homesitewwwrootfavicon.ico 上的 favicon.ico 时似乎出现了问题.

在那个位置确实没有网站图标.我纠正了这个,但仍然是同样的问题.事实上,我从来没有一个网站图标,而且这曾经可以工作.

最后,我在 Azure Portal 中删除了整个 Web App 并重新发布了……TADA,它又可以工作了.

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 for this exception?

I have done the following but with no luck:

  • Using the diagnostics error page on startup:

    app.UseErrorPage();

  • Setting ASPNET_ENV in Azure portal:

Using DNX beta 6.

解决方案

According to this post (thanks Muhammad), I should be able to get the runtime error on Azure by editing the server's web.config (quite correct, Celt).

Unfortunately this did not work - no detailed exception.

I did some digging around and found these "DetailedError" logs:

This is what they contained:

It appears that something may have been going wrong when trying to resolve favicon.ico at D:homesitewwwrootfavicon.ico.

There indeed was no favicon at that location. I rectified this, but still the same problem. In fact, I have never had a favicon, and this used to work.

In the end, I deleted the entire Web App in Azure Portal and republished... TADA, it works again.

这篇关于在 Azure Web 应用中显示 ASP.NET 5 错误页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆