Ah ha! I've got it working now, and I wanted to share what I did to get up and running (it's not entirely obvious).
- First, get the latest release of
ELMAH here:
http://code.google.com/p/elmah/ (I
ended up using the BETA3 release
which was just released today,
incidentally. Props to the ELMAH
devs. The download I grabbed was
the ELMAH-1.0-BETA3-bin drop.
- Unzip that to a location on your
disk
- Look in the
ELMAH-1.0-BETA3-bin\samples
directory for web.config and open
this in an editor. (There is a LOT
of html comments in this file
explaining the different entries --
a color coding IDE / editor is very
useful here.)
- The section (about 3/4 of the way
down the config) that starts with
'The section is
required for running ELMAH under
Internet Information Services 7.0' is VERY
important. This is the config
section you'll be using.
GoDaddy uses IIS 7.0 for its .NET 2.x/3.x ASP.NET hosting, so it's important that you use the system.webServer section, not the system.web section.
I have used the following config sections and added them to the appropriate places in my web.config:
<configSections>
<sectionGroup name="elmah">
<!-- NOTE! If you are using ASP.NET 1.x then remove the
requirePermission="false" attribute from the section
elements below as those are only needed for
partially trusted applications in ASP.NET 2.0 -->
<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>
</configSections>
<elmah>
<security allowRemoteAccess="true" />
<!--
Use to log errors into separate XML files that are stored on
disk at the path specified in the logPath attribute.
-->
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="Elmah.ErrorFilter" type="Elmah.ErrorFilterModule" preCondition="managedHandler" />
<add name="Elmah.ErrorMail" type="Elmah.ErrorMailModule" preCondition="managedHandler" />
</modules>
<handlers>
<add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
One final note: *If you're using xml based logging (like I am) make sure the App_Data directory exists off your root web directory.*
The end result of this configuration is that I can use ELMAH to view exceptions that occur in prod (and are logged by ELMAH), but since I can't use ELMAH in the local ASP.NET development server. I think this is a good trade-off since I can see exceptions locally in Visual Studio.
*Update 12/9/08 - For some reason, I haven't been able to figure out how to write *.xml files to app_data, so I switched to the SQL logger. Just be sure to run the .sql script in your database that you configure.*