EDIT: It appears the file jquery.unobtrusive-ajax.js is not being loaded into IE when IE runs. It is on the server and I can see it in the scrips but I can't find it in the IE scripts..
I have searched several links and many have answers of changing the content-type to either text/plain or text/html.
My issue is unique since it only happens on the development server with ie.
Locally with IE and chrome is works fine. On the server with Chrome it works fine, IE it does not.
I am returning a JSON object
C#
return Json(new { success = true, approved = true, redirect = Url.Action("Index", "Dashboard") }, "text/html");
JS
function Redirect(data) {
debugger;
data = JSON.parse(data);
if (data.success) {
if (data.approved == false) {
//some code
}
else {
//some code
}
}
However all I get on my screen in the JSON object displayed out in plain text..
{"success":true,"approved":true,"redirect":"/Home/Index/"}
I am stumped as to why this is happening. I have tried to change the content type to all different kinds of versions. And this is only happening while running from the server and not locally.
Here is also the responses.
Response
Key Value
Cache-Control private, s-maxage=0
Content-Type text/html; charset=utf-8
Date Fri, 17 Jul 2015 20:54:49 GMT
Response HTTP/1.1 200 OK
Server Microsoft-IIS/8.0
Transfer-Encoding chunked
X-AspNet-Version 4.0.30319
X-AspNetMvc-Version 5.2
X-Powered-By ASP.NET
X-SourceFiles =?UTF-8?B?QzpcVXNlcnNccnF1ZWVuXFNWTlxGT09EXEZvb2RBcHA=?=
Request
Key Value
Accept text/html, application/xhtml+xml, */*
Accept-Encoding gzip, deflate
Accept-Language en-US
Cache-Control no-cache
Connection Keep-Alive
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Thanks in advance.