如何在IIS 6中允许HTTP OPTIONS请求?

我有一些麻烦,允许从我正在工作的网站CORS OPTIONS请求。 在做了一些研究之后,我的印象是为了使CORS OPTIONS请求能够正常工作,需要做以下事情:

在HTTP Headers选项卡下有以下内容:

Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST,DELETE,OPTIONS Access-Control-Allow-Headers: x-requested-with, cache-control, content-type, origin 

在“主目录”选项卡下,将“执行权限”设置为“ Scripts Only或“ Scripts and Executables

我已经完成了所有这些,但是当我尝试提交以下请求时,我得到一个403.1错误:

 Request URL:https://mystaging.verbalink.com/Secure/File/Handler.ashx?Id=9070c032-cced-4155-af29-6f6df476598d,c606c3c8-d06f-43ce-ab25-0614b0142659 Request Method:OPTIONS Status Code:403 Forbidden Request Headers OPTIONS /Secure/File/Handler.ashx?Id=9070c032-cced-4155-af29-6f6df476598d,c606c3c8-d06f-43ce-ab25-0614b0142659 HTTP/1.1 Host: mystaging.verbalink.com Connection: keep-alive Access-Control-Request-Method: POST Origin: http://mystaging.verbalink.com User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31 Access-Control-Request-Headers: cache-control, origin, x-requested-with, content-type Accept: */* Referer: http://mystaging.verbalink.com/Secure/File/MultiUpload2.aspx Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Query String Parametersview sourceview URL encoded Id:9070c032-cced-4155-af29-6f6df476598d,c606c3c8-d06f-43ce-ab25-0614b0142659 Response Headers HTTP/1.1 403 Forbidden Allow: OPTIONS, TRACE, GET, HEAD, POST Content-Length: 1758 Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Access-Control-Allow-Methods: POST,DELETE,OPTIONS Access-Control-Allow-Headers: x-requested-with, cache-control, content-type, origin Access-Control-Allow-Origin: * Public: OPTIONS, TRACE, GET, HEAD, POST Date: Mon, 08 Apr 2013 20:19:10 GMT 

有没有人看到任何错误的方式,我有IISconfiguration,可能会导致此错误?

在IISpipe理器中,右键单击网站并select属性。 切换到主目录选项卡,然后单击configurationbutton。 在应用程序扩展名列表中,find您的Web服务使用的扩展名(例如.svc for WCF,.asmx for ASP.NET Web服务),select它,然后单击编辑button。 在限制到字段中,确保OPTIONS包含在逗号分隔的列表中。

对话框的屏幕截图

然后单击确定,直到对话框全部closures,这应该是。