Implementing Custom Membership user and Custom Membership Provider

后端 未结 2 738
温柔的废话
温柔的废话 2021-01-06 13:23

References

http://msdn.microsoft.com/en-us/library/6tc47t75%28v=VS.80%29.aspx

http://msdn.microsoft.com/en-us/library/ms366730.aspx

Question

相关标签:
2条回答
  • 2021-01-06 14:03

    You need to return a MembershipUser instance in the function which is the return type for it. Currently it isn't returning what it is supposed to return.

    There is a good tutorial at codeproject : Custom Membership Providers. You might find it helpful in understanding where you aren't getting right.

    0 讨论(0)
  • 2021-01-06 14:13

    You should not create a new method that return CustomMembershipUser.

    You should have only MembershipUser CreateUser(...) in the custom membership provider. Before your return you need to cast the CustomMembershipUser to be MembershipUser.

    E.g. out following when you return.

    return (MembershipUser)new CustomMembershipUser();

    0 讨论(0)
提交回复
热议问题