当前位置首页 > IIS知识

IIS和.NET系统类型与版本信息泄露解决方法

阅读次数:808 次  来源:admin  发布时间:

修改web.config(红色部分为要添加的)

lt;configuration&gt

lt;system.web>

lt;compilation debug="true" targetFramework="4.5"/>

lt;httpRuntime requestValidationMode="2.0" enableVersionHeader="false"/>

lt;customErrors mode="Off"/>

lt;webServices>

<!--允许其他机器调试WEB服务-->

lt;protocols>

lt;add name="HttpSoap"/>

lt;add name="HttpPost"/>

lt;add name="HttpGet"/>

lt;add name="Documentation"/>

lt;/protocols>

lt;/webServices>

lt;/system.web>

lt;system.webServer>

lt;httpProtocol>

lt;customHeaders>

lt;remove name="X-Powered-By" />

lt;/customHeaders>

lt;/httpProtocol>

lt;/system.webServer>

lt;/configuration>

添加Global类

添加方法

rotected void Application_PreSendRequestHeaders()

{

Response.Headers.Remove("Server")

}

IIS和.NET系统类型与版本信息泄露解决方法

上一篇:XPSP3无法安装IIS系统版本iis5.1iis6
下一篇:Linux统计文件行数-bijian1013