Implementing Custom Membership user and Custom Membership Provider

杀马特。学长 韩版系。学妹 提交于 2019-12-01 00:37:06

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.

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();

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!