A Tech Log

October 13, 2008

Build a Queued (MSMQ) WCF Response Service

Filed under: Development — adallow @ 9:28 am
Tags: ,

Juval Lowy has an interesting article over on MSDN about building a queued WCF response.


“Windows Communication Foundation (WCF) enables disconnected work between clients and services. The client posts messages to a queue and the service processes them later. Such interaction permits a different programming model from the default request/response pattern, enabling possibilities such as load leveling, improved availability, and compensating work, to name just a few. This column starts with a brief introduction to Windows® Communication Foundation queued calls and then presents an interesting problem-how to get results out of a queued call-and the solution via some cool Windows Communication Foundation programming techniques and a few helper classes I wrote for this purpose.”


Returning a HTTP Respose Code from WCF Rest

Filed under: Development — adallow @ 9:26 am
Tags: ,

The WebOperationContext has a property called OutgoingResponse (which is of type OutgoingWebResponseContext) which in turn has a StatusCode property that you can set. WebOperationContext.Current is available for REST based WCF services in much the same way as HttpContext is available for ASMX/ASPX and ServiceContext is available for normal (non rest) WCF Services

     = System.Net.HttpStatusCode.OK;

Blog at WordPress.com.