1、在wwwroot目录建立web.config文件(windows2008、windows2012服务器系统),文件代码如下:<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer> <security> <requestFiltering> <verbs allowUnlisted="true"> <add verb="OPTIONS" allowed="false"/> </verbs> </requestFiltering> </security> </system.webServer></configuration>这样我们就禁止了WEB服务启用了OPTIONS方法了!
