Main Page | Report this Page
.NET DotNet Forum Index  »  ASP.NET - Webservices Forum  »  Custom MembershipProvider calling web service...
Page 1 of 1    

Custom MembershipProvider calling web service...

Author Message
Vincent Finn...
Posted: Thu Sep 03, 2009 5:32 am
Guest
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
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Thu Mar 18, 2010 12:25 pm