Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help with Elmah Configuration in ASP.NET

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.

like image 486
Gavin Miller Avatar asked Mar 20 '09 20:03

Gavin Miller


1 Answers

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.

like image 186
notandy Avatar answered Oct 11 '22 11:10

notandy