service.close() vs. service.abort() - WCF example

Posted by Larry Watanabe on Stack Overflow See other posts from Stack Overflow or by Larry Watanabe
Published on 2009-07-20T20:34:37Z Indexed on 2010/03/13 16:55 UTC
Read the original article Hit count: 301

Filed under:
|
|

In one of the WCF tutorials, I saw the followign sample code:

Dim service as ...(a WCF service )

try

   ..

   service.close()

catch ex as Exception()
  ... 

   service.abort()

end try

Is this the correct way to ensure that resources (i.e. connections) are released even under error conditions?


Thanks for the answers guys! I upvoted you all.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about vb.net