What is the difference between marking a wcf method with
[OperationContract(IsOneWay = true)]
attribute and checking the generate asynchronous operations checkbox when adding a service reference?
From what I have read, it seems the asynchronic nature of the call should only be defined on the client side. If that's the case, what is the point of the [OperationContract(IsOneWay = true)] ?
Right now, I just have the following method running in the WCF method.
public void UpdateIndex(IndexElement[] indexElements)
{
// start the update on a new thread.
Thread thread = new Thread(() => UpdateIndexThread(indexElements));
thread.Start();
}
I create a service reference in my client's code, and I simply call:
indexerClient.UpdateIndex(indexElements);
Where indexerClient is an instance of my WCF service.
Should this also work? It doesn't seem to, it's almost as though it waits for the thread to complete before returning.