WCF – Queryable over SOAP using OData URI’s

Tuesday, September 3, 2013

OData protocol offers a rich and powerful query API over the data exposed from the data service. Usually, the query description is aggregated to the URI of the service operation as the query string, then the service can translate that query back on to the queryable model and return the specific query desired by the client. If you used it before, you must have seen the power it brings you in exposing the data to many clients and platforms to support each and every need. In addition to WCF Data Services, ASP.NET WebAPI has too...
tags: ,
no comments

WCF – Publishing Unreferenced Data Types

Thursday, February 21, 2013

The default behavior of WCF services is to expose schemas in the service metadata of the object data graph that is exposed in the service contract. When consuming the metadata, the default behavior is very similar in the sense that it creates the object data graph that is exposed in the service contract. In some cases you may want to publish additional data as part of the service metadata even though it isn’t referenced somewhere in the service contract, that is other than the fault contracts, parameters object graph, and the return values. How can...
tags: ,
no comments

WCF – Custom Message Encoder and Operation Message Size

Thursday, 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: ,

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

Tuesday, 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: ,

WCF – TCP with UserNameToken without Message Security

Sunday, November 7, 2010

There was a project that I assisted with the WCF communications where they needed to allow the client to specify different credentials without being dependent on the windows account. The first thing that comes into mind is to use the UserNameToken technique to pass in the client credentials. The design instructed to use TCP as the transport and not use message security. Obviously, this technique has privacy and integrity issues where there isn’t any encryption nor signing, but that was their decision because it wasn’t an issue in the purpose of the project. Well, this setting isn’t...
tags: ,

WCF Service Throttling

Sunday, March 21, 2010

Throttling is an important behavior of your WCF service that you should be addressing before publishing your service to clients. The throttling behavior holds the configuration for 3 limitations that control the amount of resources that your service hosting can allocate to deal with client requests, thus enables you to manage the resource usage and balance the performance load. It is crucial that you set the behavior appropriately because the default limitations of this service behavior is considered to be quite low. The reason for such default values was for blocking DOS (Denial of Service)...
tags: ,

WCF Contrib v2.1 Mar07

Sunday, March 7, 2010

A new release had been published - WCF Contrib v2.1 Mar07. This release is the final version of v2.1 Beta that was published on February 10th, you can check the entire updates made from v2.0 further in this post. You can distinguish between this release and the v2.1 Beta Feb10 by checking the assembly file version, in this release it was incremented to v2.1.0.1. Changes from v2.1 Feb10 Beta: There is a one small change which is a breaking change for those who used the asynchronous invocation pattern using the "InvokeChannelAsync" or "InvokeAsync"....
no comments

WCF Contrib Questions

Wednesday, February 10, 2010

I decided to blog about common questions I receive regarding WCF Contrib. You can find all questions in the WCF Contrib FAQ. Communication Patterns What's the best practice for web applications that call services? Research has shown that in concurrent environments such as web it is more scalable and has better performance to use a dedicated communication object per a sequence of invocations (sequential - one call after another in the same execution chain flow). ...
no comments

WCF Contrib v2.1 – Customize Output Caching Provider

Monday, February 8, 2010

Via http://wcfcontrib.codeplex.com/wikipage?title=ClientChannelOutputCache Output Cache Provider Factory This is the factory class that is responsible for creating the actual output cache provider. This is where you extensibility point kicks in, you can replace the built-in factory with your own, read about it here. The factory needs to have a public parameter-less constructor and implement 'IOutputCacheProviderFactory' public interface IOutputCacheProviderFactory { IOutputCacheProvider CreateProvider(); } As you can see, this is a simple factory interface for providing the actual provider implementation. Output Cache Provider Output cache provider is where the magic really happens. This is...
no comments

WCF Contrib v2.1 – Client Channel Output Caching

Saturday, February 6, 2010

Via http://wcfcontrib.codeplex.com/wikipage?title=ClientChannelOutputCache. A new feature that arrived at WcfContrib v2.1 Feb10 Beta. You can use the output caching to cache the operation output with the setting of your desire. This is extremely useful and may save you quite some time from building client caching stores. The built-in mechanism implemented here is In-Proc in-memory cache using the synchronized dictionary that comes with WcfContrib as well. You can fully customize it and change the underlying provider or store. (E.g. EntLib/ASP.NET Caching/AppFabric...
no comments