c# - What is the best coding pattern in asp.net for calling a web service which requires polling? -


In ASP.NET, I have to call a reporting service that has the following semantics: 1. Create a report 2. Check If the report is ready to download 3. Download the report

My current implementation is that it is done in the loop with the # 2 thread. Sleep (1000) is so much that I choose every other.

I am thinking that ASP.Net 4.5 is a better way to use Assanck Methods.

If you want to use async, instead of the thread Task.Delay Use. Sleep:

  while (wait for proxy.PollServer ()) {Tasks. Waiting (1000); } Wait for the return proxy. Downloadport ();   

You can tell, flip your structure so that the server client SignalR :

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -