Here is my ajax call:
jQuery.ajax({
type: 'GET',
dataType: 'xml',
url: 'http://XYZ/AAA/BBB.asmx?op=QQQ',
data: user_id,
contentType: 'application/xml; charset=utf-8',
headers: {
'Access-Control-Allow-Origin': '*'
},
success: function (data) {
alert(data);
},
error: function (data) {
alert(data);
}
});
I'm getting the following errors:
- 403 forbidden error.
- XmlHttpRequest cannot be loaded.
- 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:55777' is therefore not allowed access.