【发布时间】:2010-10-14 15:26:03
【问题描述】:
我正在尝试设置ELMAH 来记录我们应用程序的错误。我已成功添加模块并且加载 ErrorLog 页面 (elmah.axd) 没有问题。但是,Elmah 没有记录我生成的任何测试异常。
我的 web.config 如下所示:
<configSections>
<!-- Other stuff -->
<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"/>
</sectionGroup>
</configSections>
<elmah>
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>
<httpHandlers>
<!-- Other stuff -->
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>
</httpHandlers>
<httpModules>
<!-- Other stuff -->
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
</httpModules>
点击测试异常页面http://localhost/elmah.axd/test 会生成yellow screen,但没有日志条目。
在提供的示例和DotNetSlackers 上的教程之间,我看不出有什么问题。有什么我想念的吗?我也尝试通过Signaling 生成错误,但这也不起作用。
我正在针对 DotNetNuke 运行它,所以这就是我目前认为问题所在。
【问题讨论】:
标签: .net asp.net dotnetnuke elmah