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 You can tell, flip your structure so that the server client Task.Delay Use. Sleep:
while (wait for proxy.PollServer ()) {Tasks. Waiting (1000); } Wait for the return proxy. Downloadport ();
SignalR :
Comments
Post a Comment