title: Detecting if the server still has an ajax request using different browser c# jquery
body: <p>I'm currently developing a website and having trouble finding the right solution.</p>
  
  <p>When I open my site from a different browser and tried to make an AJAX call at the same time, I get an error, because both the browsers are processing the request. </p>
  
  <p>Is there a way to detect if the server is currently executing an AJAX call and wait until it finishes the first request before executing the second one?</p>
  
  <p>here is my code when i tried to make an ajax request at the same time using different browsers</p>
  
  <pre><code>using (StreamWriter sw = new StreamWriter(hhpPath + "\\Contents\\" + Path.GetFileName(hhpPath).ToString() + ".hhp", false))
              {
  
                  sw.WriteLine("[OPTIONS]");
                  sw.WriteLine("Compatibility=1.1 or later");
                  sw.WriteLine("Compiled file=" + hhpPath + "\\Unpublished\\"+ Name +".chm");  //the file to be converted
                  sw.WriteLine("Contents file=" + (hhpPath + "\\Contents\\" + Path.GetFileName(hhpPath).ToString()) + ".hhc"); //TOC file
                  sw.WriteLine("Default topic=" + "Installing the Prototype Terminal.html");
                  sw.WriteLine("Display compile progress=no");
                  sw.WriteLine("Index file=" + (hhpPath + "\\Contents\\" + Path.GetFileName(hhpPath).ToString()) + ".hhk"); //index file
                  sw.WriteLine("Title=none");
                  sw.WriteLine("\r\n[FILES]");
                  sw.WriteLine("none");
              }
  </code></pre>
  
  <p>the error says that the file is currently on use.</p>