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 9315937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:29:19+00:00 2026-06-19T02:29:19+00:00

I have created to webMethod on the page where those method will be called

  • 0

I have created to webMethod on the page where those method will be called with $.ajax() at client side. First Webmethod is working on time consuming task. Task takes more than 8 minutes to complete. Immediately after making ajax call to first method I am making call to another Web Method, which finish in a second or 2. So I should be getting the response from second WebMethod ajax call immediately. But here, in this case Second Web Method not executing untill first call finish. Below example simulate the my scenario.

[WebMethod]
public static string PullData(int snapshotId)
{
    string str = "Pull Started: " + DateTime.Now.ToString() + "\n";
    Thread.Sleep(30000);
    str += "Pull End: " + DateTime.Now.ToString();
    return new JavaScriptSerializer().Serialize(str);
}

[WebMethod]
public static string CheckStatus(int snapshotId)
{
    return new JavaScriptSerializer().Serialize("Check Status" + DateTime.Now.ToString());
}

Below is Javascript call on button click.

   <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">

         function pullData(){

             $.ajax({ type: 'POST',
                 url: 'Default.aspx/PullData',
                 data: '{ snapshotId: 101 }',
                 contentType: 'application/json; charset=utf-8',
                 dataType: 'json',
                 success: function (msg) {
                     var curMsg = $("#message").attr("innerHTML") + "<br />";
                     $("#message").attr("innerHTML", curMsg + msg.d);
                 },
                 error: function (jqXHR, textStatus, errorThrown) {
                     alert(jqXHR.responseText);
                 }
             });

            CheckStatus();
            return false;
        }


        function CheckStatus() {
            //alert("this is check status");
            $.ajax({ type: 'POST',
                url: 'Default.aspx/CheckStatus',
                data: '{ snapshotId: 101 }',
                contentType: 'application/json; charset=utf-8',
                dataType: 'json',
                success: function (msg) {
                    var curMsg = $("#message").attr("innerHTML") + "<br />";
                    $("#message").attr("innerHTML", curMsg + msg.d);
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    alert(jqXHR.responseText);
                }
            });

            return false;
        }

    </script>

in this above calls CheckStatus Method should return response, before PullData Method return the response. But CheckStatus executing after PullData finish its job.

I may be missing here or not aware of complete behavior. Please help!!!

Has anybody encountered this issue?

  • 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-19T02:29:21+00:00Added an answer on June 19, 2026 at 2:29 am

    I found that there can not be executed multiple AJAX request simultaneously. However, request are asynchronous but those goes in Queue. Until first request finish with any status success/fail next request doesn’t go to server. Ultimately we have executed multiple request simultaneously, but it doesn’t go to server until previous finishes.

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

Sidebar

Related Questions

I have created an jquery ajax call and it is working fine in Chrome,
I have created some JQuery that will expand a div 'popup' on hover and
I have created a custom post type named People. I have created a page
I have a ASP.NET page with a WebMethod that creates an object and runs
i am using script manager to call a web method on client side but
For the first time I am using ajax with asp.net. There for I am
I have created a .NET WebService. There I have implemented the following WebMethod: [WebMethod]
I have a 2 ajax functions on my page. One that works when a
I have the following web service method (.ASMX file): [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat =
I am working on a client (Silverlight) interface to a collection of webmethod. And

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.