3

我有一个安装了 ELMAH nuGet 包的 ASP.NET MVC 4 应用程序,托管在 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.
4

1 回答 1

1

这在 FTP 进入并手动删除 Newrelic 文件夹后效果非常好,因为 Azure 无法为我做到这一点。

uninstall-package NewRelic.Azure.WebSites
于 2013-08-06T03:40:45.223 回答