keithly + wcf   1

iServiceOriented.com - Indisposable - WCF Gotcha 1
Everywhere else in the .NET framework, you can count on Dispose cleaning up your object... not so in this case. The problem is that Dispose actually calls Close, and if you are using something like the WsHttpBinding, Close doesn't just clean up resources managed by the object. Close actually needs to make a call to the server and tell the server to clean up your session before it shuts down. When that call back to the server can't be made for any reason--which can happen quite often--Close fires an exception and the object is not disposed. There is another method, Abort, which you need to call to clean up the object's state.
wcf  IDisposable 
may 2011 by keithly

related tags

IDisposable  wcf 

Copy this bookmark:



description:


tags: