Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:40:24+00:00 2026-06-17T18:40:24+00:00

In Visual Studio 2012 I created an MVC 4 project using the Internet template,

  • 0

In Visual Studio 2012 I created an MVC 4 project using the Internet template, when I then update jQuery to the current version of 1.9 I get a jQuery error when attempting to log in to the generated web application. This error only occurs in IE (I’m running IE 10) and appears to be due to differences in the JSON parsers across the different browsers.

So what I need to work out is, how can we use the MVC 4 Internet template and yet still be able to update to jQuery 1.9.

Here’s the steps to repro the error;

1: Create a new MVC 4 project using the Internet project template – the template uses jQuery 1.7.1.1 and works fine, I can register as a new user and sign in etc.
2: Now update jQuery, jQuery validation and jQuery UI to the latest versions (currently 1.9.0, 1.10.0 and 1.10.0 respectively).
3: Run the app and switch to the sign in page. This page generates an error in the following jquery.unobtrusive-ajax.js code;

    $("a[data-ajax=true]").live("click", function (evt) {
    evt.preventDefault();
    asyncRequest(this, {
        url: this.href,
        type: "GET",
        data: []
    });
});

4: OK though, no problem, live() was removed in jQuery 1.9 so I include the jQuery migration script jquery-migrate-1.0.0.js.
5: I re-run the application and now get an error when I sign in parsing JSON in jquery-1.9.0.js. The error is in the parseJSON method;

    parseJSON: function( data ) {
    // Attempt to parse using the native JSON parser first
    if ( window.JSON && window.JSON.parse ) {
        return window.JSON.parse( data );
    }...

The error is caused by ‘undefined’ being passed to parseJSON and thus in IE window.JSON.parse throws an error where no error is thrown in other browsers.

So the question is, what would be an acceptable workaround to get the MVC 4 Internet template working with jQuery 1.9 on IE?

Incidentally, here’s the partial parseJSON method from jQuery 1.8 which explains why there was no error previously.

    parseJSON: function( data ) {
    if ( !data || typeof data !== "string") {
        return null;
    }...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:40:26+00:00Added an answer on June 17, 2026 at 6:40 pm

    The answer might be in this link.
    http://forum.jquery.com/topic/parsejson-in-1-9-0-is-different-from-earlier-versions
    It seems like the MVC team is planning to fix it in the next release. I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Visual Studio 2012, I created a new ASP.NET MVC 4 web project, using
I created a new ASP.Net MVC 4 project using the template in Visual Studio
I've created a brand new MVC 4 application in C# using Visual Studio 2012.
I've created a new ASP.Net MVC 4 project in Visual Studio 2012 and figured
I created an ASP.NET MVC project in Visual Studio 2012 on my laptop, did
I have a web application template created in Visual Studio 2012 using GIT for
I created an empty C++ project in Visual Studio 2012 Express (for Desktop of
I have a simple web service I have created. I'm using Visual Studio 2012
When I create a new ASP.Net MVC 4 project with Visual Studio 2012 it
I created a new class library project in Visual Studio 2012, to define data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.