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