WCF Tips: Achieving High Performance. List of Key Design Decisions and Tuning Parameters

יום חמישי, יולי 3, 2008

When working with WCF especially when middle-tier client applications uses Windows Communication Foundation, you sould always think about performance and take some major design decisions and tuning parameters. WCF client not generated as a proxy via SvcUtil.exe (Relevant more in .NET 3.0. In .NET 3.5 major performance improvement was made on WCF proxy creation). Client shares service contract and schema (model classes as data contract). Cache WCF proxy as a static member One instance, once instance only, ever Still thread-safe based on WCF under-the-covers network connection pool managementChannels created directly via ChannelFactory Hidden static channel exposed as a property Getter/Setter logic does all initialization/abort/recreation as necessary Maintains clean...
8 comments

Did you know that svcutil with /r does not work for MessageContract

I was trying to generate WCF proxy (Client) using svcutil.exe Visual Studio 2008 version. I also need to use the /r parameter of the svcutil.exe, so the generated proxy code will not generate definition for the objetcs from my reference assemblies.The command I use is something like:svcutil.exe /async http://localhost:8080/MyService /r:"C:\My.dll" /tcv:Version35 /out:MyClient.csIn case the assembly My.dll contain .NET object that mark as  the generated proxy still contain definition for the MessageContract objects, so I have to change these objects to DataContract objects and then the generated proxy was created as expected.You also need to remember that if your reference...