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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:28:16+00:00 2026-06-01T13:28:16+00:00

I have a .NET webservice which I need to hit asynchronously from the jQuery

  • 0

I have a .NET webservice which I need to hit asynchronously from the jQuery and update the grid based on the result got from service. My problem here is that, the service hit is async only for the first time and the subsequent requests are sync (even after specifying async=true in the ajax call) as shown below

jQuery.ajax({
            type: "POST",
            url: url,
            data: data,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true,
            success: function(msg) {
                var result = msg.d;
                return callback(result);
            },
            error: $.callDotNetSM.onError
        });

My .NET service method is something like below.

[WebMethod(EnableSession = true)]
public static string GetData()
{
}

So, please help me in calling the service asynchronously all the times. Any help is highly appreciated.

  • 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-01T13:28:17+00:00Added an answer on June 1, 2026 at 1:28 pm

    The page your WebMethod is being called on needs to have the following in the Page Directive:

    <%@ Page Async="true" EnableSessionState="False" %>
    

    The reason for this is that ASP.NET locks the Session every time it is accessed so that it cannot run asynchronously.
    Even if you do not use the Session in your WebMethod the page still thinks it uses it by default unless you tell it otherwise.

    Edit:

    Your problem could also be that you have EnableSession="true". You may just need to set it to false.

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

Sidebar

Related Questions

Can anyone help? I have an issue with calling a asp.net webservice from jquery..
I have a webservice (.NET) which returns JSON result. The iOS application consumes that
I need to access the response from a .NET web service which returns data
I have an ASP.NET Webform which currently calls a Java WebService. The ASP.NET Webform
I have a webservice programmed in coldfusion which I'm attempting to consume using c#.net.
I have a .net web application which has a reference to a web service.
I have an ASP.net web service that I'm using for a web application which
I have an ASP.NET WebService that supports standard WSDL based SOAP calls and a
I have ASP.NET page, it calls webservice via $.ajax and returns result in json
I have a .NET webservice and a client program which was written by C++.

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.