I have problem win API MVC 4 in visual studio 2010 in client side, i used Ajax:
$.ajax
({
headers:
{
'Content-Type': 'application/json',
'Access-Control-Allow-Origin':'*',
'Access-Control-Allow-Methods' : 'POST, GET, OPTIONS, PUT',
'Access-Control-Request-Method':'*',
'Access-Control-Allow-Headers':'*',
'Accept': 'application/json',
'allow-navigation':'*'
},
type: "GET",
url: "http://ift.tt/1M1RBaO",
//contentType: "application/json",
datatype: "json",
async: true,
crossDomain: true,
success: function successfunc(data)
{
alert(data);
},
error: function failfunc(data) {
alert('Error!');
}
when i run in IE browser is OK, but i run it in firefox browser i see error:
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://ift.tt/1M1RBaO. (Reason: CORS preflight channel did not succeed)."
Please help me this problem
Thanks very much!!
Aucun commentaire:
Enregistrer un commentaire