New MSDN articles about WCF and WF

MSDN recently published a series of new articles about WCF and WF.  Take a look and let me know what you think… Workflow Services Describes how to create and configure workflow services. Endpoints: Addresses, Bindings, and Contracts Describes how to control multiple aspects of your service. Data Transfer and Serialization Describes how serialization of data…


WCF Keep Alive Channel

Customers periodically ask for a way to enable TCP Keep Alive on the underlying socket for the TCP transport in WCF.  The most often reason I hear this request is to workaround an idle timeout on some intermediary device (like a proxy or load balancer).  However, TCP Keep alive is a hop by hop solution…


Fix available for SMSvcHost.exe Event Log ID 8 issue

A fix for the SMSvcHost.exe Event ID 8 issue described here has now been published.  The download can be found at here: The associated KB article has details of where to get the fix.


Server-side Tcp Connection pooling

An internal customer was asking how to control connection pooling on the server side of WCF for the Tcp Transport.  There are two knobs to control this behavior.  The first controls how long a connection can stay open while waiting to be reused and can be set through the IdleTimeout property on the TcpConnectionPoolSettings object,…


SMSvcHost.exe Event Log ID 8 – An error occurred while dispatching a duplicated socket: this handle is now leaked in the process

Recently, I have worked with several internal and external customers that are hitting an odd error when using WCF’s TCP Port Sharing Service or Tcp Activation Service. The symptoms include client’s timing out during channel open, an event log entry on the server, and, in some cases, a server process that doesn’t ever respond to…


TCP Port sharing – Access is denied

I recently helped a customer who ran into this error: System.ServiceModel.CommunicationException: The service endpoint failed to listen on the URI ‘net.tcp://localhost/CalcultorService.svc/’ because access was denied.  Verify that the current user is granted access in the appropriate allowAccunts section of SMSvcHost.exe.config. —> System.ComponentModel.Win32Exception: Access is denied They had updated the <allowedAccounts> section of the smsvchost.exe.config file…


Impersonation code in C#

While investigating a customer issue, I needed code to impersonate a different user on the current thread.  A quick search of the msdn blogs turned up this post, which got me most of the way there.  I decided to wrap the code into a class that inherits from IDisposable just to make it easily usable…


Sample Asynchronous SslStream Client/Server Implementation

I was recently asked about sample code for the System.Net.Security.SslStream using the asynchronous APIs.  I searched the web and couldn’t find anything significant, so I decided to write some that included the asynchronous usage of the TcpListenter and TcpClient objects (both in the System.Net.Sockets namespace).  In this post, I will show both the client and…


Creating a Process Memory Dump

  When trying to help customers debug some issues it is periodically necessary to get a memory dump (snapshot) of a process for analysis at another time or place.  This is frequently the case when an error is intermittent or a live debug session is not feasible (like in a production environment).  I will discuss…


Be consistent in your configuration

I recently worked with a customer using BizTalk 2004.  They were experiencing some very odd behavior where a WebService client would call into a BizTalk WebService and experience a long wait before the client finally got a timeout error.  The timeout happend to correspond to the 120 second timeout configured in IIS.  Being fairly new…