In my application I need to set a http response header. I'd like to do this in web.config.
The best way to do this would be the <customHeaders> element of the web.config file. Note that this only works for IIS version 7 and above.
<customHeaders>
web.config
The configuration to add your example header would be:
<configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Content-Language" value="*" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>
For more information see the IIS "Custom Headers" Configuration Reference page
1.4m articles
1.4m replys
5 comments
57.0k users