6
votes

I have the following Elmah configuration:

<elmah>
    <security allowRemoteAccess="0" />
    <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="Elmah.Sql"  />
    <errorLog type="Elmah.MemoryErrorLog, Elmah" size="50"  />
    <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>

But I get this error when I run my application:

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

1
Can you post the <configSections> declarations and the rest of your Elmah config? - Kev

1 Answers

6
votes

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.