tag:blogger.com,1999:blog-1528805174514452404.post7785289373859401859..comments2024-03-11T03:18:28.137-04:00Comments on Allen Conway: Visual Studio LIVE! Day 1 - WCF and Web APIAllen Conwayhttp://www.blogger.com/profile/07010967958393033081noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-1528805174514452404.post-66531462247518275882012-12-11T07:24:06.982-05:002012-12-11T07:24:06.982-05:00About the 'using' statement issue: As you ...About the 'using' statement issue: As you guessed, it has nothing to do with the IL that is generated. It isn't directly related to the using statement itself either. The issue is with the way IDisposable() is implemented by WCF client objects (ClientBase of T). The client's Dispose() calls Close(), which will throw an exception if the channel is in a faulted state. If this happens, the underlying resources are not cleaned up properly. The way around this design flaw is to try to dispose of the client, and then call Abort() if close fails.<br /><br />http://msdn.microsoft.com/en-us/library/aa355056.aspx<br /><br />http://stackoverflow.com/questions/573872/what-is-the-best-workaround-for-the-wcf-client-using-block-issue<br /><br />http://geekswithblogs.net/DavidBarrett/archive/2007/11/22/117058.aspxdaugerhttps://www.blogger.com/profile/12756737682194998551noreply@blogger.com