Remove the X-Aspnet-Version HTTP header

Objective

  • Remove the X-Aspnet-Version HTTP header

To remove the X-Aspnet-Version HTTP header from each response from ASP.NET, add the following code to the web.config file.

<system.web>
 <httpRuntime enableVersionHeader="false" />
 </system.web>