Last post Sep 17, 2019 03:16 PM by mgebhard
Sep 17, 2019 02:52 PM|RDesh|LINK
I need to enable HSTS header for my website on IIS 10. But the solutions I have come across are for higer versions of IIS. Can someone tell me how I can do that? This has been given as a possible solutin:
<site name="siteName" id="1">
<!-- application tags -->
<!-- port binding -->
<hsts enabled="true" max-age="31536000" includeSubDomains="true" redirectHttpToHttps="true" />
But this does not work for IIS 10.thanks,-Rashmi
Sep 17, 2019 02:54 PM|mgebhard|LINK
The official IIS documentation cover this topic.
Sep 17, 2019 03:08 PM|RDesh|LINK
Thanks for your response. But when I run the code on my local machine, it gives this error: ERR_SSL_PROTOCOL_ERROR
localhost sent an invalid response.
Sep 17, 2019 03:16 PM|mgebhard|LINK
Does you site currently use HTTPS? Have you installed a proper certificate on the local machine? Have you configured you IIS application to use the certificate?
I recommend visiting an IIS support forum as this is an ASP.NET forum for building web sites not configuring IIS.