calling wcf service without waiting for response from console application
I presume , such a mode should exist. Just triggering WCF service and exiting. Something else will check a log ( database/file ) produced by WCF service. My understanding it is d开发者_如何学Goifferent to asynchronous call where calling application allows to do something else, but still runs some code on completion event.
Your optimal solution would be an asynchronous one-way call.
The one-way part of it says that you want to call the method, but don't expect any result back. See What You Need To Know About One-Way Calls, Callbacks, And Events for more details on that part.
The asynchronous part of it makes sure your call returns right away - not waiting for the service-side to pick up your message.
So basically you need:
[ServiceContract]
public interface IMyService
{
[OperationContract(IsOneWay=true)]
public void OneWayCall()
}
and then call this in an asynchronous matter.
精彩评论