WCF error handling and some best practices

I put together the following brief description of WCF Error Handling and some possible best practices for a customer. You may also find it useful:   There are 4 sets of errors that clients can expect:   Invalid configuration: when bindings, behaviors or any other configs are in conflict with some other settings. Communication errors:…

11

From Exceptions to Faults

A question that I often get asked during workshops on WCF is “Why does WCF use Faults instead of .NET Exceptions?” Exceptions expose a set of limitations and possible security risks: –          They are platform/technology specific: .NET exceptions may have no meaning on other platforms –          Exceptions can cause tight-coupling between clients and service. o  …

5

Digging deeper into PLINQ’s internal implementation

PLINQ is built on top of the Task Parallel Library (TPL) and promises to revolutionise the way we write programs that can benefit from the multi-core processor era. But how does it work internally? This article assumes that you are familiar with the basics of LINQ and have an understanding PLINQ and TPL. In this…

1

How to cancel a task in Parallel FX?

Task Parallel Library (TPL) allows you to easily cancel tasks. Effectively you need to call the Cancel method on the task in question. Imagine the simple sample below: Task task1 = Task.Create(Foo, 10000); static void Foo(object o) {   for (int i = 0; i < (int)o; i++)   {     // some code here…

3