Duplicate collection entry of type (0x800700b7)



Here is the error message displayed for one of the applications after I enabled Failed Request Tracing in the IIS server:

Cannot add duplicate collection entry of type ‘add’ with unique key attribute ‘path’ set to ‘*’



Since the error message mentions a duplicate record, check the web.config for identical definitions:

  1. Enable Failed Request Tracing
  2. Add a rule
  3. If the issue occurs, check web.config file. Are there identical Failed Request Tracing rules?

If there are no duplicates, check the rules in tracing module at all application, site, and server levels in IIS Manager. Make sure there are no conflicting rules.

If the issue still persists, add the line below into web.config. It will remove all existing rules to prevent duplication.

<remove path="*" />

The entire configuration of the Failed Request Tracing rule in the web.config:

<remove path="*" />
<add path="*">
<add provider="ASP" verbosity="Verbose" />
<add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
<add provider="ISAPI Extension" verbosity="Verbose" />
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket" verbosity="Verbose" />
<failureDefinitions statusCodes="500" />

Note: In my case, the environment this issue occurred had two IIS servers pointing to the same web.config (located in a network share).

Continue reading...
Top Bottom