Automatic eTag Management with WCF Web API Message Handlers

July 7, 2011 · 0 min · Amit Bahree

Troubleshooting WCF Performance - Part 1

More related details on Dustin’s post -  WCF scales up slowly with bursts of work .

May 26, 2011 · 1 min · Amit Bahree

Avoid using “using()”

The using statement in C#, seems to be quite useful especially to a developer as theoretically, you not have to do anything to release any memory you might have used and the CLR automatically frees up this memory for you. However, over time, I have had so many issues with it and subtle problems (in certain situations) I am starting to avoid it now. The two best examples that I can think of are database connection pools and WCF connections....

September 21, 2008 · 2 min · Amit Bahree

P2P Code

It took a while for me to get around to this but the P2P Code to go along with my MSDN Article “P2P Programming with WCF and .NET v3.5”. I don’t know why this code was not available on MSDN in the first place. Any ways, the can be downloaded from here (456.2 KB).

July 21, 2008 · 1 min · Amit Bahree

Load testing WCF

Someone recently asked about how to load test WCF - apart from the usual things like LoadRunner , VSTS Test Load Agent , etc a couple of other interesting options came up. One is WCF Load Test and the other JMeter. WCF Load Test generates a unit test taking in data from a a trace file along with the relevant WCF proxy or interface....

March 6, 2008 · 1 min · Amit Bahree

WCF Throttling Issues with .NET 3.0 SP1

When you install SP1 for .NET 3.0 by default that changes the throttling settings you might be use to. You could get into a situation where a number of calls are processed and then they stop with the client eventually timing out. To get around this you either explicitly close your connection (which is a good practice in most cases) or change the serviceThrottling setting in your WCF config....

January 16, 2008 · 1 min · Amit Bahree

WCF Configuration Schema

WCF’s configuration is somewhat complex and the first time you start using it can been daunting. Below is an image of the schema published by Microsoft. You can print this out on a A3 or something and use it has a handy reference. <p> <img src="images/wcf_config_schema_thumb.png" alt="wcf_config_schema"/> </p>

September 29, 2007 · 1 min · Amit Bahree

Indigo / WCF breaking changes from Jan CTP to Feb CTP

In case you were wondering why your Indigo / WCF Jan CTP code does not work with the Feb CTP, then you can find a list of all the breaking changes published by MS. It is interesting to note that Microsoft is changing the namespace so late in the game, but I would rather they get it right now and make breaking changes as opposed to when Indigo ships....

February 27, 2006 · 1 min · Amit Bahree

Dependencies between Contract Inheritance and CallBack Inheritance in Indigo

Contract inheritance (via CLR interface inheritance) is pretty cool allowing you to support versioning and contract aggregation in WCF, the catch though is if you have a Duplex interface then the callback interface must follow the same hierarchy. So if your primary interface say is IMyInterface which inheritances from ISomeInterfaceOne and ISomeInterfaceTwo, then the callback interface also needs to have the same chain or you will get an InvalidContractException. Here is an example from MSDN:...

January 5, 2006 · 1 min · Amit Bahree

Could not resolve type [your-type-here], contract cannot be created.

If you are writing an Indigo service and you can an error for something like the one shown below, then essentially you change the interface (i.e. your contract) you implemented in Indigo (now WCF), but forgot to change the interface in the web.config. <endpoint contract\="MY-TYPE-HERE" binding\="wsHttpBinding"/> Exception Details: System.InvalidOperationException: Could not resolve type IMyService, contract cannot be created. Source Error: An unhandled exception was generated during the execution of the current web request....

December 22, 2005 · 1 min · Amit Bahree