V
Vincent Finn
Hi,
I have written a MembershipProvider that calls a WCF webservice.
It works fine but I am wondering about the creation of the
ServiceClient objects.
The examples I have seen of calling a WCF webservice all follow this
pattern
MyServiceClient client = new MyServiceClient();
client.Method();
That is what I am doing but I was wondering about the expense of
creating all the MyServiceClient objects.
The Provider is not recreated for every function call so i can create
the MyServiceClient instance in the constructor and use it.
This seems the more obvious way of doing things to me but I wanted to
check if there are object lifetime issues with it or anything other
reason to create everytime?
Any advice appreciated.
Thanks, Vincent
I have written a MembershipProvider that calls a WCF webservice.
It works fine but I am wondering about the creation of the
ServiceClient objects.
The examples I have seen of calling a WCF webservice all follow this
pattern
MyServiceClient client = new MyServiceClient();
client.Method();
That is what I am doing but I was wondering about the expense of
creating all the MyServiceClient objects.
The Provider is not recreated for every function call so i can create
the MyServiceClient instance in the constructor and use it.
This seems the more obvious way of doing things to me but I wanted to
check if there are object lifetime issues with it or anything other
reason to create everytime?
Any advice appreciated.
Thanks, Vincent