Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Ajax call error + Access-Control-Allow-Origin

$
0
0

i get below error during ajax call. any one can help on this?

XMLHttpRequest cannot load https://mail.google.com/mail/feed/atom/?_=1482522512592. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 405.

$.ajax({
crossDomain: true,
contentType: "application/json; charset=utf-8",
type: "GET",
url: "https://mail.google.com/mail/feed/atom/",
dataType: "xml",
cache: false,
success: function (result) {
alert("XML File is loaded!");
alert(result);
}
});


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>