先来看一个简单mvc3网站的响应头
修改Global.asax文件
在Application_Start方法中添加如下代码
MvcHandler.DisableMvcResponseHeader = true;
修改Web.config
在system.web配置节中增加如下配置
<httpRuntime enableVersionHeader="false"/>
在Application_Start方法中添加如下代码
MvcHandler.DisableMvcResponseHeader = true;
在system.web配置节中增加如下配置
<httpRuntime enableVersionHeader="false"/>
转载于:https://www.cnblogs.com/personball/p/7455832.html