public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords) { IMembershipService proxy = ChannelFactories.GetFactory <IMembershipService>(this.EndpointName).CreateChannel(); try { MembershipUserCollection users = proxy.GetAllUsers(pageIndex, pageSize, out totalRecords); (proxy as ICommunicationObject).Close(); return(users); } catch (Exception ex) { OperationInvoker.HandleException(ex, proxy as ICommunicationObject); throw; } }
public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status) { IMembershipService proxy = ChannelFactories.GetFactory <IMembershipService>(this.EndpointName).CreateChannel(); try { MembershipUser user = proxy.CreateUser(username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey, out status); (proxy as ICommunicationObject).Close(); return(user); } catch (Exception ex) { OperationInvoker.HandleException(ex, proxy as ICommunicationObject); throw; } }