I'm trying to setup ELMAH to log errors for our application. I have successfully added the modules and am having no problems loading the ErrorLog page (elmah.axd). However, Elmah isn't logging any test exceptions that I'm generating.
My web.config looks like this:
<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>
Hitting the test exception page http://localhost/elmah.axd/test
generates a yellow screen, but no log entry.
Between the sample provided and the tutorial on DotNetSlackers I can't see anything wrong. Is there something I'm missing? I've also attempted to generate errors via Signaling, but that's not working either.
I am running this against DotNetNuke, and so that's where I'm currently thinking the problem lies.
I think what you need is to do is disable custom error messages in DotNetNuke.
1. Log on dnn Portal as host
2. Navigate to Host > Host Settings.
2. Go to the Basic Settings - Appearance section.
3. At Use Custom Error Messages, uncheck the check box.
4. Click Update.
This will disable DotNetNuke's error handler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With