Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
Or you can use T4 to generate a static class wrapper around the service. Then your call can look like this:SvcWrapper.Login(username, password);The full explanation and sample code is located here[^].
Traditional using() block disposes WCF clients incorrectly when there's a communication exception, eg dropping network connection. It raises exception during the dispose and thus the resources held by the WCF client aren't released properly. After some time, you end up with memory leaks.