c# - When to close WCF client? -


I have put an example of a client proxy in an app class for the WCF service so that I can get it in the app From anywhere

I'm not closing the client, I'm opening it for the duration of the app. The main reason for this is that if I want to follow the // comment on the WCF Service Max page (if you point to a browser on the WCF service URL, it gets this) It says that / Always Client Client .close ();

That's fine except calling the client. If I call the customer then stop it. Some ASCIN () method is being closed before the results come back. Should I be locked in the whole () method? Or should I forget about shutting it down, since once I have to make a new example of client proxy (as well as the app can not be stored in the property even if this is the case. )

Thanks, Stephen

You should advise it. And yes, if you are using async methods, you must close it after you complete the call.

To create customers (opening) and closing clients is ideal. There is no clear demonstration to constantly create and stop new customers.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -