iis7.5 批量删除处理程序映射的方法
程序员文章站
2022-07-07 08:57:28
因为服务器目前只需要支持php,那么就可以把asp,asp.net都删除了。iis7.5比较好的一点就是全部通过根目录的web.config控制,下面提供这个文件,大家就可...
因为服务器目前只需要支持php,那么就可以把asp,asp.net都删除了。iis7.5比较好的一点就是全部通过根目录的web.config控制,下面提供这个文件,大家就可以参考一下了
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <handlers> <remove name="traceverbhandler" /> <remove name="optionsverbhandler" /> <remove name="webservicehandlerfactory-isapi-2.0-64" /> <remove name="webservicehandlerfactory-isapi-2.0" /> <remove name="webservicehandlerfactory-integrated" /> <remove name="webadminhandler-integrated" /> <remove name="tracehandler-integrated" /> <remove name="ssinc-stm" /> <remove name="ssinc-shtml" /> <remove name="ssinc-shtm" /> <remove name="simplehandlerfactory-isapi-2.0-64" /> <remove name="simplehandlerfactory-isapi-2.0" /> <remove name="simplehandlerfactory-integrated" /> <remove name="securitycertificate" /> <remove name="pagehandlerfactory-isapi-2.0" /> <remove name="pagehandlerfactory-integrated" /> <remove name="httpremotinghandlerfactory-soap-isapi-2.0-64" /> <remove name="httpremotinghandlerfactory-soap-isapi-2.0" /> <remove name="httpremotinghandlerfactory-soap-integrated" /> <remove name="httpremotinghandlerfactory-rem-isapi-2.0-64" /> <remove name="httpremotinghandlerfactory-rem-isapi-2.0" /> <remove name="axd-isapi-2.0-64" /> <remove name="httpremotinghandlerfactory-rem-integrated" /> <remove name="axd-isapi-2.0" /> <remove name="assemblyresourceloader-integrated" /> <remove name="pagehandlerfactory-isapi-2.0-64" /> <remove name="aspclassic" /> </handlers> </system.webserver> </configuration>
其实就是通过 <remove name="" />进行删除的,如果想恢复指定的某个映射,可以删除对应的名称即可。