Each page in an MVC application I'm working with sets these HTTP headers in requests:
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
X-AspNetMvc-Version: 2.0
How do I prevent these from showing?
Each page in an MVC application I'm working with sets these HTTP headers in requests:
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
X-AspNetMvc-Version: 2.0
How do I prevent these from showing?
The "powered by" is a custom header in IIS. Changing it depends on the version of IIS you are using. For some information on how to modify or remove, see here:
http://www.iis.net/ConfigReference/system.webServer/httpProtocol/customHeaders
To remove the MVC header,
In Global.asax, in the Application Start event:
MvcHandler.DisableMvcResponseHeader = true;
Put this in the web.config get rid of the X-AspNet-Version header:
<system.web>
<httpRuntime enableVersionHeader="false" />
</system.web>
Check out this article Removing Unnecessary HTTP Headers in IIS and ASP.NET , it describes how to remove all your listed headers.