407代理服务器需要身份验证代理服务器、身份验证

2023-09-10 16:43:37 作者:忘

我收到以下异常,同时拨打电话Mozilla Firefox中使用XMLHTTP对象是异步的。

I'm getting the following exception while making a call using XMLHttp object asynchronously in Mozilla Firefox.

407 Proxy Authentication Required
The ISA Server requires authorization to fulfill the request.
Access to the Web Proxy filter is denied.

原因说明:

其实,我试图让一个异步请求,在JavaScript中使用GET。它工作正常使用IE 6,但对IE 7和Firefox 3.5,它采用异步请求,所以如何解决这个问题将不会得到任何的数据?

Description of cause:

Actually I'm trying to make an asynchronous request to using get in javascript. It is working fine using IE 6 but for IE 7 and Firefox 3.5, it will it won't get any data using asynchronous request so how to overcome this problem?

当我在Firefox 3.5调试用Firebug它表明

When I debug in Firefox 3.5 using firebug it shows

407 Proxy Authentication Required The ISA Server requires authorization to fulfil the request. Access to the Web Proxy filter is denied.

除了在控制台因此,如何解决这一问题

exception at console so how to tackle this issue

请注意:我们的网络有代理服务器

Note: our network has proxy server

推荐答案

我承认我有点迟到了这里,这个问题,但是,我有完全相同的问题。 @ FK82指出正确的解决方案,我想记录它,因为我已经尝试过了,它的工作原理。

I recognize I am a little late to the party here, and this question, however, I was having the exact same problem. @FK82 indicated the right solution and I wanted to document it, as I've tried it and it works.

$.ajax({
    url: "http://somefancyurl.com/api/do_it",
    data: { id:"user" },
    dataType: "jsonp",
    success: function(data) {
        console.log(data);
    }
  });

如果我不指定JSONP 我得到的 407代理服务器身份验证的错误。

If I do not specify jsonp I get the 407 Proxy Authentication Required error.

虽然原来的问题没有具体的JQuery,我能够使用这种方法和放大器成功与Firefox 3.6.x的,和IE7测试; JSONP。