I have a web.config file with following section
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache"/>
<add name="Pragma" value="no-cache"/>
<add name="Expires" value="-1"/>
<add name="X-UA-Compatible" value="IE=Edge,chrome=1"/>
</customHeaders>
</httpProtocol>
</system.webServer>
When the website accessed in IIS it gives this error :
Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'Cache-Control' this was on production site.
I tried to reproduce this in house by adding same section to following configuration files:
C:\Windows\System32\inetsrv\config\applicationHost.config file.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
But above steps did not work.
Is there some other global configuration file that needs to be set to reproduce this issue?
This is part of my investigation to find the cause of this error.
Thanks in advance
What I have tried:
I tried to reproduce this in house by adding same section to following configuration files:
C:\Windows\System32\inetsrv\config\applicationHost.config file.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
But above steps did not work.