none
MVC 4 project, Exception in jquery.2.0.2.js when debugging with IE only.

    Question

  • I have a gadget project I've been using for exploration. I started in VS2012 with a basic MVC 4 Internet Application then stripped it to the bone, HomeController with Index page only. I've been using Chrome as my VS2012 runtime browser but I decided to test it in IE and found it manifests an issues. I spent a bunch of time searching Google for the specific error I received, i.e. "JavaScript runtime error: 'JSON' is undefined", but nothing I found was working. I finally started stripping out code until I was left with a system that emits the the HTML below. In Chrome the following page is rendered. In IE I get the json error inside a jquery call.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>Gadget</title>
        <link href="/Content/site.css" rel="stylesheet"/>
        <script src="/Scripts/modernizr-2.6.2.js"></script>
        <script src="/Scripts/jquery-2.0.2.js"></script>
        <script src="/Scripts/json.js"></script>
        <script src="/Scripts/knockout-2.2.1.debug.js"></script>
    	<script src="/Scripts/knockout.mapping-latest.debug.js"></script>
        <script src="/Scripts/moment.js"></script>
    </head>
    <body>
        <h1>Hello worlds.</h1>
    </body>
    </html>

    Any thoughts or suggestions you might have will be appreciated.

    Monday, June 17, 2013 5:20 AM

Answers

  • It turns out the issue was the awesome IE Compatibility View mode was turned on. I almost never use IE and must have turned it on accidentally at some point.
    Wednesday, June 19, 2013 6:14 PM

All replies

  • Hi,

      Welcome to MSDN Forum Support.

     

      You are more likely to get more efficient responses to ASP.NET issues at http://forums.asp.net where you can contact ASP.NET experts.



    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 19, 2013 2:18 AM
  • It turns out the issue was the awesome IE Compatibility View mode was turned on. I almost never use IE and must have turned it on accidentally at some point.
    Wednesday, June 19, 2013 6:14 PM