Posts

Showing posts from December, 2015

Enable HTTP Transport Security (HSTS) in IIS 7

Q.  What is the best way to turn on   HTTP Strict Transport Security   on an IIS 7 web server? Ans:  This can be done by adding following block in Web.Config:               <system.webServer>                     <httpProtocol>                          <customHeaders>                               <add name ="X-CustomName" value="MyCustomValue"/>                                               </customHeaders>                    </httpProtocol>             </system.webServer> We have to configure on IIS that has the ability to custom headers to response: Go to Internet Information Services(IIS) Manager. Configure Response headers that are added to response from the server. Now add your custom header Name and custom Value (Custom header name and value should be same as that in Web.Config).