I have read about the memory usage of a wcf client and what i have done until now is might be wrong.
When i have used a wcf client, i created a new wcf client for each call. (for self hosting and for iis).
is it the way to go ? of i should create one client as a member and use it all around ?
what is the truly memory usage of a wcf client ?
Thanks
I have read about the memory usage of a wcf client and what i
Share
I would think that you should only create a new client when you need to call service operations from a new endpoint, but your binding typically stays the same. So you can a create a factory class to make clients for a specific contract + binding but different endpoints. For example, the following would be for WebHttpBinding but you can substitute whatever binding you need:
Where T is your service contract.