How to remove ASP.Net MVC Default HTTP Headers?

前端 未结 11 2224
自闭症患者
自闭症患者 2020-11-28 01:23

Each page in an MVC application I\'m working with sets these HTTP headers in responses:

X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
X-AspNetMvc-Version         


        
11条回答
  •  误落风尘
    2020-11-28 01:57

    The X-Powered-By header is added by IIS to the HTTP response, so you can remove it even on server level via IIS Manager:

    You can use the web.config directly:

    
       
         
           
         
       
    
    

提交回复
热议问题