What part of web.config do I insert the elmah tag?

I want to write this

<elmah> <errorlog type="Elmah.XmlFilerErrorLog, Elmah" logPath="~/App_Data" /> </elmah> 

or

 <elmah> <errorLog type="Elmah.SQLiteErrorLog, Elmah" logPath="~/App_Data" /> </elmah> 

however, in every place where I tried to put this tag, I get an Unrecognized configuration section elmah. . I found this question ELMAH setup: unrecognized configuration section error , however I tried this (solution at the bottom of the question) and still get the error. Where can I put this?

-edit- I found a problem. I did not set <sectionGroup name="elmah"> correctly. I could not find it on the net, and then remembered that the demo had sqlite logging, and I checked the demo configuration for tips.

+6
web-config elmah
Jan 21 '10 at 9:51
source share
1 answer

You need to add a partition group. Something like that:

 <sectionGroup name="elmah"> <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> </sectionGroup> 

You can then add the elmah section anywhere in the configuration tag (not inside any other tag).

+16
Jan 21 '10 at 9:56
source share



All Articles