gpt4 book ai didi

asp.net-mvc - 为什么 elmah 日志返回 Request timed out on production server?

转载 作者:行者123 更新时间:2023-12-01 16:12:35 25 4
gpt4 key购买 nike

我有一个安装了 ELMAH nuGet 包的 ASP.NET MVC 4 应用程序,托管在 Windows Azure 上。当我在本地主机上访问/elmah 时一切正常,但在生产服务器上我现在收到请求超时错误。它也曾经在生产服务器上工作。我对该应用程序所做的最后更改是删除 MiniProfiler 和 Glimpse 包,并在 Windows Azure 网站上添加 New Relic 分析包和附加组件。 Elmah 仍然记录所有错误(我可以看到生成的 xml 文件),但我不知道为什么我不能再查看错误日志。有什么想法吗?

这是完整的错误信息:

Server Error in '/' Application.
Request timed out.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request timed out.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Request timed out.]

这是 web.config:

    <sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>

...

<appSettings>
<add key="elmah.mvc.disableHandler" value="false" />
<add key="elmah.mvc.disableHandleErrorFilter" value="false" />
<add key="elmah.mvc.requiresAuthentication" value="true" />
<add key="elmah.mvc.allowedRoles" value="admin" />
<add key="elmah.mvc.route" value="elmah" />
</appSettings>

...

<system.web>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
</system.web>

...

<system.webServer>
<modules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
</system.webServer>

...

<elmah>
<security allowRemoteAccess="true" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/elmah" />
</elmah>

更新:现在我开始收到 502 错误

502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

最佳答案

这在通过 FTP 登录并手动删除 Newrelic 文件夹后效果非常好,因为 Azure 无法为我做这件事。

uninstall-package NewRelic.Azure.WebSites

关于asp.net-mvc - 为什么 elmah 日志返回 Request timed out on production server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17061247/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com