关闭ASP.NET应输出版本标头
2012-12-07 23:52
148 查看
HttpRuntimeSection.EnableVersionHeader 属性,Visual Studio 使用此属性确定正在使用的 ASP.NET 版本。它不是生产站点必需的,可被禁用。
// Get the EnableVersionHeader property value.
Response.Write("EnableVersionHeader: " +
configSection.EnableVersionHeader + "<br>");
// Set the EnableVersionHeader property value to false
configSection.EnableVersionHeader = false;
<system.web>
<httpRuntime enableVersionHeader="false"/>
// Get the EnableVersionHeader property value.
Response.Write("EnableVersionHeader: " +
configSection.EnableVersionHeader + "<br>");
// Set the EnableVersionHeader property value to false
configSection.EnableVersionHeader = false;
<system.web>
<httpRuntime enableVersionHeader="false"/>
相关文章推荐
- asp.net窗体的打开和关闭(输出js)
- asp.net窗体的打开和关闭(输出js)
- [转]ASP.NET 缓存(七)--根据 HTTP 标头缓存页的版本
- [转]ASP.NET 缓存(十一)--缓存用户控件输出的多个版本
- asp.net中在线输出各种文件的写法.(excel为例)
- 如何在已经发布站点的IIS上,将已发布的低版本的ASP.NET升级成高版本
- 【转载】各版本IIS下ASP.net请求处理过程(1)
- ASP.NET中将数据输出到Excel
- WebUI Studio for ASP.NET发布2013版本 全面支持HTML5和CSS3
- asp.net中的web.config文件通用版本,免出现httpRuntime错误
- ASP.NET MVC 教程 -使用输出缓存提高性能(C#)
- ASP.NET 4中的可扩展输出缓存(可以缓存页面/控件等)
- ASP.NET后台通过输出JavaScript弹出窗口小结 弹窗弹框
- IIS asp.net 版本冲突解决办法
- ASP.net在页面所有内容生成后、输出内容前对页面内容进行操作
- asp.net 请求输入到输出的全过程及httpHandler和httpModuler详细介绍
- Asp.Net页面输出到EXCEL
- asp.net判断浏览器版本代码
- asp.net mvc 中[Authorize]在IE9以上版本关于FormsAuthentication.SetAuthCookie无效的问题 解决方案
- asp.net 子页面关闭刷新父页面