我似乎无法OPTIONS
在我的 IIS6 托管 ASP.NET 应用程序中接收 HTTP 请求。Global.asax
我正在使用我的方法中的调试断点(和文件日志)对其进行测试Application_BeginRequest
。断点永远不会被命中,并且客户端会收到 HTTP 403 Forbidden,我直接从 IIS6 假设(GET
s 和POST
s 可以正常工作)。
我在 中尝试了几件事web.config
,包括在<system.webServer><handlers>
和<system.web><httpHandlers>
部分中添加以下行。
<add name="OptionsHandler" verb="OPTIONS" path="*" type="System.Web.DefaultHttpHandler"/>
我也玩过<system.webServer><security><requestFiltering><verbs>
设置和allowUnlisted="true"
和<add verb="OPTIONS" allowed="true"/>
。
此外,我没有使用 URLScan 或任何其他可能拦截呼叫的工具。如果您对 IISLogs 感兴趣:
2011-07-11 20:26:05 W3SVC1215124377 127.0.0.1 OPTIONS /test.aspx - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+5.2;+rv:5.0)+Gecko/20100101+Firefox/5.0 403 1 0
有没有办法OPTIONS
在 ASP.NET 应用程序中接收请求?