Duplicate collection entry of type (0x800700b7)

  • Thread starter Thread starter Nedim
  • Start date Start date
N

Nedim

Guest
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 ‘*’

medium?v=1.jpg





Solution



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:



<configuration>
<system.webServer>
<tracing>
<traceFailedRequests>
<remove path="*" />
<add path="*">
<traceAreas>
<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" />
</traceAreas>
<failureDefinitions statusCodes="500" />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
</configuration>



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...
 
Back
Top