iis7/iis8/iis10下web.config 取消禁止asp或者aspx执行权限、取消脚本权限
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <!-- 取消asp文件执行--> <remove name="ASPClassic" /> <!-- 取消aspx 执行--> <remove name="PageHandlerFactory-ISAPI-4.0_64bit" /> <remove name="PageHandlerFactory-ISAPI-4.0_32bit" /> <remove name="PageHandlerFactory-ISAPI-2.0-64" /> <remove name="PageHandlerFactory-ISAPI-2.0" /> </handlers> <!-- 取消脚本执行--> <handlers accessPolicy="Read" /> <!-- 允许脚本执行--> <handlers accessPolicy="Read, Script" /> </system.webServer> </configuration>