我试图在这一SO员额的解决办法中采用第3号选择:。
I m 陷入一个问题,看着我的习惯头脑在 j里的麻.素法中。
我在fiddler和chrome s debug工具中证实,习惯头目实际上被浏览并接收。
答辩人(Fiddler):
Server: ASP.NET Development Server/10.0.0.0
Date: Sun, 15 Jan 2012 04:00:13 GMT
X-AspNet-Version: 4.0.30319
X-AspNetMvc-Version: 3.0
Unauthorized: 1
Cache-Control: private
Content-Length: 0
Connection: Close
Response Headers (as received by Chrome):
Cache-Control:private
Connection:Close
Content-Length:0
Date:Sun, 15 Jan 2012 04:12:13 GMT
Server:ASP.NET Development Server/10.0.0.0
Unauthorized:1
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:3.0
反应负责人(从XmlHttpRequest变量上的“植被复方”(植被)传入“jaxComplete”):
Date: Sun, 15 Jan 2012 04:42:21 GMT
X-AspNet-Version: 4.0.30319
Connection: Close
Content-Length: 65
X-AspNetMvc-Version: 3.0
Server: ASP.NET Development Server/10.0.0.0
Content-Type: application/json; charset=utf-8
Cache-Control: private
有趣的是,最初的Ajax申请(由jquery提出)的返还所要求的职能确实得到未经许可的负责人。
是否有任何人知道在座,我可以做些什么来解决这个问题?
我的“jaxComplete”javascript Code
$(document).ajaxComplete(function (event, request, settings) {
alert(request.getResponseHeader( Unauthorized ));
});