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

3
我有一个安装了ELMAH nuGet包的ASP.NET MVC 4应用程序,托管在Windows Azure上。当我在本地访问/elmah时一切正常,但是在生产服务器上,我现在得到了“请求超时”错误。它曾经在生产服务器上工作过。我对应用程序所做的最后更改是删除MiniProfiler和Glimpse包,并在Windows Azure网站上添加了New Relic profiling包和插件。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.

我也有安装New Relic分析器。也许是相关的? - roryWoods
我也遇到了同样的问题。在Azure上使用Elmah和NewRelic。 - cdeutsch
1个回答

1
这在我通过FTP手动删除Newrelic文件夹后非常有效,因为Azure无法为我执行此操作。
uninstall-package NewRelic.Azure.WebSites

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接