My customer recently ran into this error on their newly installed SCOM 2019 (UR2) Web Console server. After a brief search on the interwebs I couldn’t find anything specific for SCOM, except a few folks asking for help with this, so here is my experience with this issue. Hopefully this will help others.
The error indicates that this name, “X-Content-Type-Options”, has already been added and cannot be added again by the ‘web.config’ file. How does it already exist (so that it “cannot add duplicate?” It appears higher in the hierarchy, inside the ‘applicationHost.config’ file, which gets inherited by all of your web sites. Think of it as a global config. Think of the individual ‘web.config’ files as a individual site config.
If I use the Configuration Editor at the server level, it will show me the entire hierarchy of configurations.
This is where your ‘applicationHost.config’ file typically lives:
You can also find the location with the Configuration Editor as shown below:
Here you can see where ‘name’ is already defined in ‘applicationHost.config’:
Here you can see it defined again in the OperationsManager website ‘web.config’:
How do I fix it?
- Comment out the line in the ‘web.config’. (CTRL+Q in Notepad++)
- Save the file.
- Restart IIS.
- Make a sandwich.
What is ‘X-Content-Type-Options’ ?
There’s no way I’m going to explain this correctly so see this page instead.