Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6793007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:02:57+00:00 2026-05-26T18:02:57+00:00

References http://msdn.microsoft.com/en-us/library/6tc47t75%28v=VS.80%29.aspx http://msdn.microsoft.com/en-us/library/ms366730.aspx Question In the 2nd link precisely under heading Create a Custom

  • 0

References

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

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

Question

In the 2nd link precisely under heading Create a Custom Membership Provider you will note that they mention this

You will need to create a custom membership provider that supports
both your custom membership user type, and your custom membership data
store. The GetUser and CreateUser methods of the custom membership
provider can be written to return objects of the custom membership
user type.

below is my custom membership user with custom fields

Custom Membership User

 public class CustomMembershipUser : MembershipUser
    {
        //private fields for internal use
        private bool _isMarried;
        private bool _hasLicense;
        private string _address;
        private int _userId;

        //public fields for use by end user

        public int UserId
        {
            get { return _userId; }
            set { _userId = value; }
        }
...

Custom Membership Provider

public class CustomMembershipProvider : MembershipProvider
    {
        .....

        public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            throw new NotImplementedException();
        }
....

I did exactly what they told me to do, return membership user of my custom type like this

public override **CustomMembershipUser** CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)

but then i was complained by the IDE that
Cannot Change return type when overriding MembershipProvider.CreateUser. So what am i supposed to do now,

  • Create another method with same parameters and return custom membership user?
  • I don’t have any need for password question, security question fields how do i get rid of them?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:02:58+00:00Added an answer on May 26, 2026 at 6:02 pm

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

MSDN reference: [1] http://msdn.microsoft.com/en-us/library/5ey6h79d.aspx#Y1178 From the link it says that the first argument will
As I read http://msdn.microsoft.com/en-us/library/ms165394.aspx : For VB: Inside the Snippet element, add the References
http://msdn.microsoft.com/en-us/library/ee796239%28v=vs.91%29.aspx#Y3078 but, i am hobbyist (small time :) ) i dont understand every thing
On the page http://msdn.microsoft.com/en-us/library/bb202066.aspx If references something called POLL Driver V2 however this is
http://msdn.microsoft.com/en-us/library/dd997415.aspx Per the article referenced above I am trying to handle exceptions in a
I found this: http://msdn.microsoft.com/en-us/library/vslangproj80.reference3%28VS.80%29.aspx what I have in mind is that many of the
I'd like to use the Caching Handler: http://msdn.microsoft.com/en-us/library/ff648868.aspx I may want to use some
I am following the steps listed here: http://msdn.microsoft.com/en-us/library/dd483478.aspx at the bottom of that page
I was looking at http://msdn.microsoft.com/en-us/library/szywdw8k%28VS.80%29.aspx and part of the code didn't make sense to
I'm using this as a reference: http://msdn.microsoft.com/en-us/library/dd182449(v=VS.85).aspx So the implementation is very similar. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.