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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:05:33+00:00 2026-06-11T16:05:33+00:00

I made 3 Ajax processes to run the below code at the same time.

  • 0

I made 3 Ajax processes to run the below code at the same time.
but one of the processes throw exception that message says “The underlying provider failed on Open.”

try{
    orderRepository orderRepo = new orderRepository(); // get context (Mysql)

    var result = (from x in orderRepo.orders
          where x.orderid == orderno
          select new {x.tracking, x.status, x.charged }).SingleOrDefault();

    charged = result.charged;
}catch(Exception e){
    log.Error(e.Message); //    The underlying provider failed on Open.
} 

And, I run the 1 Ajax call that failed before, then It passes through.

It happen to 1 of 3 (Ajax) process, sometimes, 2 of 5 process.

I guess it because all process try to using Database same time. but I couldn’t find the solution.

This is my connection string,

<add name="EFMysqlContext" connectionString="server=10.0.0.10;User Id=root;pwd=xxxx;Persist Security Info=True;database=shop_db" providerName="Mysql.Data.MySqlClient" />

Anybody know the solution or something I can try, please advise me.

Thanks

  • 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-11T16:05:34+00:00Added an answer on June 11, 2026 at 4:05 pm

    It sounds like a problem because of concurrent connection with SQL Server using same username. Have you tried destroying/disposing the repository(or connection) object after using it?
    Give it a try:

     try{
           using( orderRepository orderRepo = new orderRepository()) // get context (Mysql)
            {
              var result = (from x in orderRepo.orders
                  where x.orderid == orderno
                  select new {x.tracking, x.status, x.charged }).SingleOrDefault();
    
            charged = result.charged;
        } // orderRepo object automatically gets disposed here
    catch(Exception e){
            log.Error(e.Message); //    The underlying provider failed on Open.
        } }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a simple code for ajax to call a page but it
I have made a form validation using ajax post method. But i got the
Possible Duplicate: return AJAX callback return I have made a JQuery code using AJAX,
I've made an application that makes full use of ajax, and what I need
I have made one JQgrid which calls Ajax for getting data on loading the
I have an HTML page with a JavaScript code that sends AJAX request. The
I made some ajax sites in the past where I used ajax to get
i'm working on a project which works very much with ajax (made via jquery).
I have made a simple chat application in PHP/Ajax/MySQL. I am regularly calling these
I've made a list who's content is loaded via AJAX, and it works as

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.