Monthly Archives: September 2010

Hanging WCF Service

Standard

 

image

Suffering from a hanging WCF service? I was.  The hanging wasn’t in my service code but in the depths of service side WPF.

Apparently the serverside was being throttled within WCF instelf (see this article) due to many open connections.  Basically, in the client remember to call Close on the service. 

Dim loService As New ClientService.ClientConnectClient
Dim lsOut As String = loService.SomeServiceMethod("Hello")
loService.Close()

Because methods are so stateless (and I didn’t have to call an Open method) it didn’t occour to me that I’d need to call Close.

Although WCF is supposed to abstract you away from the network I’m finding that an understanding of the underlying technology (eg IIS) is essential to work effectively with it.

Links

http://blogs.msdn.com/b/tess/archive/2009/01/09/net-hang-my-application-hangs-after-i-called-my-wcf-service-a-couple-of-times.aspx

Advertisements