我想在一个潜在的复杂环境中实现相对简单的事情.我想使用plupload jQuery UI插件将文件从JavaScript小部件(Netvibes UWA格式)上传到本地Intranet服务器.
我似乎正确地设置了我的代码 - plupload容器出现了,我可以愉快地选择和上传文件.上传似乎工作 - 每个文件达到100% - 但当我检查我的Firebug控制台时,我收到以下错误:
OPTIONS upload.php - 403 Forbidden
并且文件不会上传到我指定的files目录.

frogserver.curriculum.local位于内部IP 192.168.3.15上staff.curriculum.local位于内部IP 192.168.3.60上JavaScript的
widget.onLoad = function(){
$( "#datetime" ).datepicker({ dateFormat: "yy-mm-dd" });
Input.init();
/* plupload */
$("#uploader").plupload({
// General settings
runtimes : 'html5,flash,html4',
url : 'http://staff.curriculum.local/frog/LOTS/upload.php',
max_file_size : '1000mb',
max_file_count: 20, // user can add no more then 20 files at …Run Code Online (Sandbox Code Playgroud) 我似乎无法OPTIONS在我的IIS6托管的ASP.NET应用程序中接收HTTP 请求.我在我Global.asax的Application_BeginRequest方法中使用调试断点(和文件日志)测试它.断点永远不会被命中,客户端获取HTTP 403 Forbidden,我从IIS6直接假设(GETs和POSTs工作正常顺便说一句).
我试着在几个方面web.config,包括添加以下行要么两者的<system.webServer><handlers>和<system.web><httpHandlers>部分.
<add name="OptionsHandler" verb="OPTIONS" path="*" type="System.Web.DefaultHttpHandler"/>
Run Code Online (Sandbox Code Playgroud)
我也玩过<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
Run Code Online (Sandbox Code Playgroud)
有没有办法OPTIONS在ASP.NET应用程序中接收请求?
我正在尝试将来自AngularJS 1.3应用程序的跨源请求发送到REST服务.虽然我启用了CORS过滤器,但我收到了403 Forbidden响应.这是请求(从chrome dev工具复制粘贴).在IE 9上它似乎工作.我在Chrome和Firefox上收到403错误代码.
Remote Address:127.0.0.1:8080
Request URL:http://localhost:8080/<path>
Request Method:OPTIONS
Status Code:403 Forbidden
Request Headersview source
Accept:*/*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4
Access-Control-Request-Headers:x-auth-token, content-type
Access-Control-Request-Method:POST
Connection:keep-alive
Host:localhost:8080
Origin:http://localhost:9000
Referer:http://localhost:9000/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, ike Gecko) Chrome/40.0.2214.111 Safari/537.36
Response Headersview source
Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:Origin, Accept, x-auth-token, Content-Type,
Access-Control-Request-Method, Access-Control-Request-Headers
Access-Control-Allow-Methods:POST, GET, HEAD, OPTIONS
Access-Control-Allow-Origin:http://localhost:9000
Content-Length:0
Content-Type:text/plain
Date:Tue, 17 Feb 2015 07:11:24 GMT
Server:Apache-Coyote/1.1
Run Code Online (Sandbox Code Playgroud)
网址没问题.如果我直接将其粘贴到浏览器中就可以了.
交叉原始身份验证有效:
Remote Address:127.0.0.1:8080
Request
URL:http://localhost:8080/<serviceName>/webapi/authentication/authenticate
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:*/*
Accept-Encoding:gzip, …Run Code Online (Sandbox Code Playgroud) iis ×2
ajax ×1
angularjs ×1
asp.net ×1
cors ×1
cross-domain ×1
http-verbs ×1
iis-6 ×1
javascript ×1
jquery ×1
php ×1
plupload ×1
rest ×1