Friday 15 June 2012

jquery - XDR post returning "access denied" in IE 8 & 9 -


I am requesting an Ajax from xx to x.com, and I have to work in most browsers except IE 8 Everything is and 9, where I get an access denied error. I have my code here

  if (! Blank and radio_check) {$ ("Modal-content") . ({Height: "250px"}), 500, function () {}; $ .support.cors = true; Var url = "localhost: 5603 / ajax / post / sales-xm /?" // localhost for locally tested ($ .browser.msie & window.xDomainRequest) {var xdr = New XDomainRequest (); Xdr.open ("post", url + data); // *** error here *** xdr.send (data); } And {$. Ajax ({type: "post", url: url, data: data, datatype: "jsonp", success: function (r) {// nothing is necessary here}}); }}   

Again, all browsers include IE 8 & amp; 9. Besides, I have access-control-permission-origin-custom headers on web.config.

I'm not sure how this XDR works, but for some reason my server But it works like this, but it seemed like 'Open' me. Ajax response started from the net back-end, and is being blocked through sending (it does not speak right, but this is how it was found in Fiddler), no form data was being posted, Because of which all seemed to be weird.

To fix this, I changed the post to a position, and added a section to my not Ajax controller which if if Request.Form.AllKeys.Length = 0 , Instead get the query string.

No comments:

Post a Comment