title: How can I have only one instance of a Web service used for all the clients?
body: <p>I have a web service that executes a task that may take hours to finish (asynchronously)</p>
  
  <p>I would like to share the status of that task by all the clients that connects to the server (I'm using a web application for this)</p>
  
  <p>For example, the first client that calls the page <a href="http://localhost/process.aspx" rel="nofollow noreferrer">http://localhost/process.aspx</a>
  will instantiate the web service and it will call a method to start executing the task. A percentage number will be displayed showing the status of completion. I can do this by polling the web service using AJAX.</p>
  
  <p>If there is another client that tries to opens that page, it should get the same percentage information so no new instances of the web service are created.</p>
  
  <p>How is the best way of doing this? 
  I thought about different solutions but sooner or later I find new problems.
  These are some of the possible alternatives:</p>
  
  <ul>
  <li>Create an static object of the Web service.</li>
  <li>Create the object in the global.asax file.</li>
  </ul>
  
  <p>Do you guys have any other ideas? I'm not too familiar designing web sites and this is driving me crazy. I would appreciate if you guys could provide some code snippets.</p>
  
  <p>Thanks</p>