Everything was running smoothly with my C# web application.
However, to enhance security measures, I decided to add the "nosniff" custom header in the web.config file.
<system.webServer>
</handlers>
<httpProtocol>
<customHeaders>
<add name="X-Content-Type-Options" value="nosniff" />
</customHeaders>
</httpProtocol>
</system.webServer>
Unfortunately, this change caused the application to break and display nothing. Upon checking the browser, I received the following message:
Refused to execute script from 'https://localhost:003/extnet-ini-js/ext.axd?' because its MIME type ('application/json') is not executable and strict MIME type checking is enabled.
The issue lies with the extnet server-based library that I am using.
Being a server-based asp.net library, I am unsure how to include MIME type in headers. Is there any solution to this problem?