468,115 Members | 2,063 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,115 developers. It's quick & easy.

Closing a WCF connection asynchronously

Hello,

I have a web page that is getting some data from a WCF webservice. I
have it operating pretty nicely. The connection open is running
asynchronous and it all works. I noticed that the IClientChannel
interface also has a Begin/End close method. My question is: can I
just call BeginClose and trash the IAsyncResult? Will it fail to close
completely when it disposes? Its not really a big deal, I'm just
curious.

Norm
Nov 21 '08 #1
2 2275
Nevermind.

I'll just call close during Page.Unload which wont block the page
being rendered to the client. Much easier.

Norm
Nov 21 '08 #2
this is a really, really bad programing practice. you should not be
calling async routines from an aspx page except via the
AddOnPreRenderCompleteAsync method. this is the only supported method.

as long as there is no load on you site you can get away with what you
are doing, but any load and you will start having problems.

-- bruce (sqlwork.com)

Norm wrote:
Nevermind.

I'll just call close during Page.Unload which wont block the page
being rendered to the client. Much easier.

Norm
Nov 21 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Naresh Agarwal | last post: by
6 posts views Thread by Steven Blair | last post: by
3 posts views Thread by Zeng | last post: by
7 posts views Thread by Tumurbaatar S. | last post: by
1 post views Thread by archana | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.