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

  • SEARCH
  • Home
  • 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 8272647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:11:56+00:00 2026-06-08T07:11:56+00:00

I am looking for a way to debug what happens between $.ajax and Controller

  • 0

I am looking for a way to debug what happens between $.ajax and Controller action. Is there a way to see how long these stretches are and if there is a delay where it happens(if network, then where?)?

  • 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-08T07:11:59+00:00Added an answer on June 8, 2026 at 7:11 am

    Here’s one approach you could try in order to isolate the problem. You start a brand new ASP.NET MVC application and put a controller action that simulates some work:

    public ActionResult SetSearchResults(SearchCriteria searchCriteria)
    {
        Thread.Sleep(400);
        return Json(new { success = true });
    }
    

    and you invoke it with AJAX:

    $.ajax({
        contentType: 'application/json, charset=utf-8',
        type: "POST",
        url: '@Url.Action("SetSearchResults")',
        data: JSON.stringify({ }),
        cache: false,
        success: function (response) {
        }
    });
    

    then observe the time it takes for the AJAX request to execute in your javascript debugging tool (I am using Chrome developer toolbar but you could FireBug as well if you prefer):

    enter image description here

    405ms. Great, I guess this figure doesn’t surprise anyone. If you get a different number you may start worrying seriously. But I doubt you will get a different number. So the problem doesn’t come neither from ASP.NET MVC nor AJAX.

    That’s barebone. Now you could start adding some real work to your controller action by shaping it with database calls and stuff until you find the smoking gun. Add things progressively. Start by manually instantiating your repository class, then if you are using DI framework add that later, etc… It’s very important to do it one step at a time.

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

Sidebar

Related Questions

Is there any easy way to debug cgi python programs apart from looking at
I am looking for a way to see realtime (as I debug) what is
I am looking for a way to debug crashes happens on user devices. currently
I am looking for a way to debug what a jquery selector returns. I
I've been looking for a way to debug Adobe Air Javascript apps with the
I am looking for a way to debug compiled assemblies from Visual Studio. Is
I'm looking for an easy way to debug RESTful services. For example, most webapps
I'm looking for a way to debug queries as they are executed and I
I'm looking for a quick way to debug my SQLite queries in an iOS
I'm looking for way to create list view as like in IOS with pinned

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.