I am a software developer and I debug a website on my local machine in IIS 7.5. Recently I experienced problems with my machine that would not go away, so I backed up, formatted, resintalled Windows and my IDE, and set everything back up again.
After publishing my site to IIS, now I am greeted with a config error page that says: Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'X-Frame-Options'.
If I look in the features view of IIS at Custom Headers I see that I have two custom headers defined X-Frame-Options and Strict-Transport-Security.
I do have that custom header defined in my web.config, and if I remove it the other custom header also causes the error only with regard to that header .
Having removed both entries, the site now loads, but I no longer have either of the custom headers.
Now is the Custom Headers Feature I have no custom headers.
Are custom headers defined somewhere else? Why does it think I have duplicates. Those key values (e.g. ) are only defined in the web.config once, no duplication.