Monday, March 7, 2011

How to make a call to my WCF service asynchronous?

Hi,

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?)

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

    Implementing an Async Service Operation

    Calling WCF Service Async

    Designing Service Contracts

  • the WCF Proxy inside of your client (Windows Service?) needs to be specified at creation that you wish to have Asynchronous operations available.

    You can modify an existing WCF Proxy by right clicking on it and choosing 'Configure Service Reference' From here you just need to check the tick box next to 'Generate asynchronous operations'

    Ok so that is the WCF Proxy side of things taken care of. Now you need to use APM (Asynchronous Programming Model) with the Proxy inside of your client.

  • Try this video..helped me to start quickly

0 comments:

Post a Comment