Take the 2-minute tour ×

I have the following Elmah configuration:

    <security allowRemoteAccess="0" />
    <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="Elmah.Sql"  />
    <errorLog type="Elmah.MemoryErrorLog, Elmah" size="50"  />

But I get this error when I run my application:

Sections must only appear once per config file. See the help topic for exceptions.

share|improve this question
Can you post the <configSections> declarations and the rest of your Elmah config? –  Kev Jun 13 '11 at 21:38
add comment

1 Answer

You can only use one of each type of logger in Elmah. What you specify in the <errorLog> section is where Elmah logs it's data.

When you retrieve errors using the /elmah.axd handler it retrieves this data from the data source type specified in the <errorLog> section. It doesn't really make sense to have more than one, or at least it's not designed that way.

share|improve this answer
Interesting, I thought Elmah was like NLog, where you could specify multiple targets or in this case errorLogs. –  guanome Apr 30 '13 at 14:27
@guanome - correct and indeed you can, but in the OP's case he is trying to specify multiple <errorLog> sections of the same name. He'd need something like <errorLog> for the primary log store where /elmah.axd would retrieve its data and <errorLogMem> & <errorLogXml> sections defined as alt log destinations. I probably didn't explain that very well in my answer. Unfortunately OP didn't respond to my request for him to post the configSections/sectionGroup of his web.config so my answer was best effort with the information available at the time. –  Kev Apr 30 '13 at 15:31
add comment

Your Answer


