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)
精彩评论