开发者

Webservice and two 'parallel' requests from client

开发者 https://www.devze.com 2023-01-23 10:43 出处:网络
I have such a problem. Suppose we have a client (WinForms app), which invokes some methods from webservice.

I have such a problem. Suppose we have a client (WinForms app), which invokes some methods from webservice. Every 5 minutes (Interval of Timer) I invoke asynchronously webmethod A. Suppose that time of its execution take a 1 minute. When this operation runs, I open some Window, and invoke开发者_开发技巧s webmethod B synchronously... or i try to do it. Application suspended, wait until webmethod A ends, then process webmethod B (or I have an exception - Connection was closed, or Timeout...).

Is there any possibility to run this A, B webmethods 'parallel'?

Best regards,


You need to call the service on a background thread using the BackgroundWorker component. (Or the ThreadPool)

Depending on how you're calling the web service, you can also call the asynchronous version (BeginXXX and EndXXX)

0

精彩评论

暂无评论...
验证码 换一张
取 消