问题
Using ASP.NET 4.5 Web Forms project that has been running for years and a new problem arose: the ASP.NET Ajax Control Toolkit Slider stop rendering an image (its a broken image symbol where the "handle" usually renders).
This only happens in IE11. Its working OK in Chrome nor Firefox (below):
Currently reviewing recent changes to code made (we've been doing an annual security review on OWASP Top 10) to see what may have broken it, but any advice appreciated.
Edit: recently we have been adding entries to our web.config customHeaders section per https://scotthelme.co.uk/hardening-your-http-response-headers
When we set X-Content-Type-Options=nosniff in web.config as below:
</system.webServer>
...
<httpProtocol>
<customHeaders>
<add name="X-Content-Type-Options" value="nosniff" />
</customHeaders>
</httpProtocol>
</system.webServer>
the slider breaks in E11. When the above is removed, the slider works in IE11.
I don't fully understand why, but this appears to be our culprit.
来源:https://stackoverflow.com/questions/49327387/asp-net-ajax-toolkit-slider-handle-displays-broken-image