ClientMembership不实现抽象成员

时间:2014-02-18 20:48:43

标签: c# inheritance authorization visual-studio-2013

我出现了这个错误(实际上有两个但是关于这部分代码)

  1. 'MyApplication.Authorization.ClientMembership'未实现继承的抽象成员'System.Web.Security.MembershipProvider.FindUsersByName(string,int,int,out int)'

  2. 'System.Web.Security.MembershipProvider.FindUsersByName(string,int,int,out int)':找不到合适的方法来覆盖。

  3. 我使用的代码就是这个:

    public class ClientMembership : ExtendedMembershipProvider
    {
        public override bool ValidateUser(string username, string password)
        {
            MyApplication.Models.User usr = new MyApplication.Models.User();
            return usr.ValidareCredential(username, password);
        }
        public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
        {
            throw new NotImplementedException();
        }
        public override MembershipUserCollection FindUserByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
        {
            throw new NotImplementedException();
        }
    

    我不知道该怎么办。有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

由于错误试图告诉您,您需要实施FindUsersByName() 您的FindUserByName()缺少s