All of a sudden I'm getting an error as follows in Visual Studio:
Error 113 Section or group name 'security' is already defined. Updates to this may only occur at the configuration level where it is defined. myProject\web.config
Here is the section that it is complaining about:-
<sectionGroup name="elmah">
<section name="security" requirePermission="true" type="Elmah.SecuritySectionHandler, Elmah" >
Needless to say the security section only occurs once. It's like it's checking a cached version of the file somewhere or something.
I had a very similar issue here recently: Elmah.MVC working under IIS Express but not IIS 7.5
However the solution there does not appear to be working here
OK it turns out this was related to setting MVCBuildViews to true... Which seemed like a reasonable think to want to do but seems to cause these issues. I'd be interested still to know a better solution that would allow me to continue to use this flag.