Question: Good day!

I have simple wcf service and desktop client,wich uses some functions.
But my client fault with exception that my wcf operation goes too long.

Some code:

```
 client=new MyWcfServiceClient();
 client.DoWork(param1,param2..etc);

```

I dont need to wait while DoWork do work. I need to execute this method and go forward. It is like send command to do some work and i dont need to get result immediately.

How to do that?
Thank you!

P.S. server side code looks like:

```
 DoWork(param1,etc)
   {
   // do long-term work at same thread
    }

```

P.P.S. i ingnore the result.

Answer: 
You could do something along:

```
private static Task DoWork()
{
   // do stuff here
   // return something (?) assuming you need or care about this
}

```

and then you can do something like

```
Task task = DoWork().Start;   
// you can wait, poll, or if you don't care, ignore the result

```
Using .NET 4.5, you can create task-based proxies while adding service reference to an application. This can be done using by clicking on the Advanced button in the Add Service Reference dialogue. See [here](http://sravi-kiran.blogspot.co.uk/2012/10/CallingWcfServicesAsynchronouslyUsingAsyncAndAwait.html) for more info.

Once this is done you will get the following: DoWorkAsync

Using this new proxy you can do things like this:

```
var result = await client.DoWorkAsync(param1,param2..etc);

```