在Azure中的Web应用程序显示ASP.NET 5错误页 [英] Show ASP.NET 5 error page in Azure web app
问题描述
我部署我们的ASP.NET 5 Web应用程序到Azure的Web应用程序时,得到一个500内部服务器错误。
I am getting a 500 Internal Server Error when deploying our ASP.NET 5 web application to an Azure Web App.
如何获得此例外的细节和堆栈跟踪?
我做了以下,但没有运气:
I have done the following but with no luck:
-
在启动时使用诊断错误页面:
Using the diagnostics error page on startup:
app.UseErrorPage();
设置 ASPNET_ENV
在Azure的门户网站:
Setting ASPNET_ENV
in Azure portal:
使用DNX测试6。
推荐答案
据的这个帖子(感谢穆罕默德),我应该可以通过编辑服务器的web.config获得在Azure上运行时错误(十分正确的,凯尔特人)。
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.
我做了一些挖了一圈,发现这些DetailedError日志:
I did some digging around and found these "DetailedError" logs:
这是他们装的是什么:
看来,试图在 D解析
。的favicon.ico
东西的时候可能已经走错了:\\家\\网站\\ wwwroot的\\图标。 ICO
It appears that something may have been going wrong when trying to resolve favicon.ico
at D:\home\site\wwwroot\favicon.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.
最后,我删除了整个Web应用程序的Azure中的Portal和再版...... TADA,它再次工作。
这篇关于在Azure中的Web应用程序显示ASP.NET 5错误页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!