Posts

Showing posts from November, 2013

OneWay vs Async in WCF

Image
Download the sample code here:  http://milestonetg.com/examples/OneWayServiceExample.zip On a recent project, there was some debate about the behavior of OneWay OperationContracts, so I thought I'd put together a little example. Specifically, the debate centered around when control is returned back to the calling routine. Let's take a look at the MSDN docs... http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontractattribute.isoneway(v=vs.110).aspx " Use the  IsOneWay  property to indicate that an operation does not return a reply message. This type of operation is useful for notifications or event-style communication, especially in two-way communication.  " " Specifying that an operation is a one-way operation means only that there is no response message. It is possible to block if a connection cannot be made, or the outbound message is very large, or if the service cannot read inbound information fast enough. If a client requires a...