开发者

Cross-Site XmlHttp (XDomainRequest)

I'm writing a web-based tool for my company and it is running off the local intranet and running in IE8. I believe since the company computers are in a SOE, nobody has control over the browser settings except the IT department and they will be unlikely to make any changes, at least not in the timeframe we need it.

I have an XmlHTTP request to a URL which is in "Trusted Sites" (also on th开发者_如何转开发e local intranet), but when I send the request, I get an exception: "Access is denied", and when I catch the exception and output it to my page, I get "TypeError: Access is denied".

Is there any way I can get IE8 to complete this AJAX request?

Edit: Upon further researching, it turns out that the problem may not have anything to do with trusted sites/local intranet after all. Apparenly you can't do cross-domain XmlHttp requests. My system is accessed by an IP address, whereas the target site of my AJAX script is (still local) a domain, which resolves to a different IP address. Unfortunately I've already tried writing a PHP script which will get the page from the server-end, however it also refuses to connect without a username/password.

At this stage I'm open to any hacky suggestions on how to get around this. If I can get this function to work, it will save us days of manually inputting data.


Since IE8 does not support CORS you either have to do a proxy or make the request with JSONP or get everything under the same IP.


Yes, no matter if requests are on same server, you cannot do cross-domain XmlHttp requests. I don't know what are you trying to achieve but you can't do that with your listed tags.

You should consider some programming.

You can make a little proxy page in any programming you want and make those XmlHttp requests threw that proxy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜