0

I've tried to implement cross-domain using crossDomain=true, dataType:jsonp, contentType:text/html in jquery's ajax function. But the browser throws an error showing resource interpreted as script but transferred with mime type text/html. I've added Access-Control-Allow-Origin: * in IIS custom header.

My applications is built using ASP.NET MVC 3. I am sending GET request to get the data and data is adctually an HTML page. I've already tested it in IE, Chrome and FF. All three browsers are throwing an error. I refered this as a reference.

EDIT:

application/x-javascript and text/html is already there as mime type in IIS. I set the required header in jquery's beforeSend

Valay
  • 1,991
  • 2
  • 43
  • 98
  • 2
    That's not a `same-origin-policy` issue, the resource was transferred but your `contentType` is wrong. – nilobarp Oct 03 '14 at 13:00
  • possible duplicate of [Chrome says "Resource interpreted as script but transferred with MIME type text/plain.", what gives?](http://stackoverflow.com/questions/3467404/chrome-says-resource-interpreted-as-script-but-transferred-with-mime-type-text) – Johnie Karr Oct 03 '14 at 13:01

0 Answers0