为什么elmah日志返回请求在生产服务器上超时?

时间:2013-06-12 08:45:41

标签: asp.net-mvc elmah elmah.mvc

我有一个ASP.NET MVC 4应用程序,安装了ELMAH nuGet包,托管在Windows Azure上。当我在localhost上访问/ elmah时一切正常,但在生产服务器上我现在得到Request timed out错误。它曾经也在生产服务器上工作。我对该应用程序所做的最后一项更改是删除了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.

1 个答案:

答案 0 :(得分:1)

在FTP中并手动删除Newrelic文件夹之后,这非常有用,因为Azure无法为我做这件事。

uninstall-package NewRelic.Azure.WebSites