Our application has a header that specifies X-AspNet-Version → 4.0.30319. This is bad not only because we're displaying which version we're using, which those with malicious intent could use against us, but also because the version itself has many vulnerabilities. My question is not how to hide the header, I've already figured that out, but rather I'd like to actually upgrade the version. I am using an Azure app service and in my web.config file I have tried the code below to no avail.
<httpRuntime targetFramework="4.7.1" />
The header still shows the same (X-AspNet-Version → 4.0.30319). How am I suppose to update this? Is it something that I can't control? I am not even using ASP.NET in my application.