I'm trying to get Elmah working under ASP.NET MVC and I thought I had. I used the very convenient Elmah MVC project which automatically setup my web.config file. Now if I run the project under IIS Express then Elmah works just perfectly. I can access it with the correct Authorisation and the logs are stored in my SQL Database. However when I try and run it under IIS 7.5 I get an:
An HTTP 500.19 Internal Server error
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x800700b7
Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ErrorLog'
Config File web.config
Config Source:
111: <modules>
112: <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
113: </modules>
I'm baffled as to why this might be. As a test I've created a brand new clean MVC project and it reacts exactly the same way.
do a
<remove name="ErrorLog"/>
before the
<add />
to get rid of any default defined entries named ErrorLog in the modules
section of your web.config file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With