Last year I released a simple demo showing the relative binding speeds of the various native bindings in WCF. Since that time, WCF the syntax has changed a bit making my original code obsolete. Now I'm posting the the source code based on the final version of WCF.
Here are the changes I made (most are simply to update):
- The client proxies changed from "Proxy" to "Client"
- <service type="..."> changed to <service name="...">
- The 'mex' binding was added.
- ServiceEndpoint was moved to System.ServiceModel.Description
- On the service interface, the ServiceContract attribute ProtectionLevel was set to ProtectionLevel.None so that security is not required, thus giving a more accurate benchmark.
You can use these as a bases for you own services, but you may also wish to look at my XML Assembly Compiler which has a WCF service template. You can simply select the template, perhaps design a few types and interfaces, and let it create your entire WCF project for you.