Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a call to my WCF service asynchronous?

Tags:

I have a WCF service that I call from a windows service.

The WCF service runs a SSIS package, and that package can take a while to complete and I don't want my windows service to have to wait around for it to finish.

How can I make my WCF service call asynchronous? (or is it asynchronous by default?)

like image 653
Blankman Avatar asked Dec 30 '08 16:12

Blankman


People also ask

How do you call async method in WCF?

Run the ServiceModel Metadata Utility Tool (Svcutil.exe) tool with both the /async and the /tcv:Version35 command options together as shown in the following command. In the calling application, create a callback method to be called when the asynchronous operation is complete, as shown in the following sample code.

Is WCF asynchronous?

In Windows Communication Foundation (WCF) applications, a service operation can be implemented asynchronously or synchronously without dictating to the client how to call it.

How do you call a method in asynchronously in C#?

The simplest way to execute a method asynchronously is to start executing the method by calling the delegate's BeginInvoke method, do some work on the main thread, and then call the delegate's EndInvoke method. EndInvoke might block the calling thread because it does not return until the asynchronous call completes.

What is a WCF call?

Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.


1 Answers

All your needs will be satisfied in the following articles from MSDN:

Implementing an Async Service Operation

Calling WCF Service Async

Designing Service Contracts

like image 61
Perpetualcoder Avatar answered Nov 09 '22 19:11

Perpetualcoder