WCF – Custom Message Encoder and Operation Message Size

December 20, 2012

You may find the need to determine the request and reply message size when calling a service operation. It can be for logging purposes, or a practical one such as deciding whether you need to compress the data or not. The key component in WCF that knows about the actual size of the message is the message encoder, and of course, you can plug-in your own encoder as part of WCF’s extensibility point. Ahhh, got to love this framework! Lets examine the feature requirements first - We need to have a...
tags: ,
7 comments

WCF – Should PerCall Care About Concurrency? (And More..)

December 11, 2012

This post discusses several questions: Should ‘PerCall’ services care about the concurrency mode? Can closing the channel block after calling O/W operation? Should you reuse the same proxy instance concurrently? Does the Async Pattern matter in concurrent client? This is quite a long post, but it should be quite interesting , you should download the example here. In order to discuss the matter, let’s establish the scenarios we’re going to test first: About the contract: ...
tags: ,
2 comments

MS DTC – Can’t get it to work? Try Reinstalling – The Proper Way

December 6, 2012

Boy that MS-DTC, huh? It can give much trouble, no doubt. If you can’t communicate between two parties and keep failing with errors such as “The flowed transaction could not be unmarshaled”, try the following: Use DNS instead of IP addresses Disable Firewall Remove security and enable the options in the MS-DTC security (in the Component Services shell) Try DTCPing to troubleshoot the case If everything seems to be set properly and you’re still experiencing connectivity issues, you should try...
tags:
no comments

.NET 4.5 Async “ConfigureAwait” – Keep the Synchronization Context in Mind

December 1, 2012

I assume you have heard about the great addition in .NET 4.5 – The Async Keyword. It is truly one of the key changes made to the .NET language, and it is awesome. Asynchrony should be part of our code, there’s no escape from that. If you write UI applications – you need asynchrony to avoid blocking the UI thread. If you make I/O operations – you should use its asynchronous model that utilizes the I/O completion threads instead of occupying a worker thread. ...
tags: ,
one comment