views:

98

answers:

1

I have it all set up and I can browse to /elmah.axd but I have been causing all these errors and it won't log any of them, it just says 'no errors logged'... what the heck did I do wrong?

Here is the stuff I have added to my web.config:

<configSections>
  <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>

<httpHandlers>
  <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>

<httpModules>
  <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />  
</httpModules>

<elmah>
  <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
  <security allowRemoteAccess="yes" />
</elmah>

ALSO: This was already at the start of my RegisterRoutes()

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

I read that it doesn't matter any more with ASP.NET MVC 1.0 though, supposedly (per ELMAH website...)

A: 

The config seems to be in order; my best guess is that your IIS web application user doesn't have permission to write to App_Data. If you've locked down permissions, the application user will have read, but not write, permissions there.

You can open permissions up or log to another directory outside of the web path (which is a bit safer IMO) and make sure that read/write permissions for the user are set there.

48klocs
YESSSSS, thank you! Now I can sleep well tonight!
shogun