我在使用来自我正在处理的网站的CORS OPTIONS请求时遇到了一些问题.在做了一些研究之后,我觉得为了让CORS OPTIONS请求起作用,需要采取以下措施:
在HTTP标头选项卡下有以下内容:
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST,DELETE,OPTIONS Access-Control-Allow-Headers: x-requested-with,cache-control,content-type,origin
在“主目录”选项卡下,为“仅脚本或脚本和可执行文件”设置“执行权限”.
我已完成所有这些,但当我尝试提交以下请求时,我收到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,origin Access-Control-Allow-Origin: * Public: OPTIONS,POST Date: Mon,08 Apr 2013 20:19:10 GMT
有没有人看到我配置IIS的方式有什么问题可能会导致此错误?