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 4382466
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:46:58+00:00 2026-05-21T12:46:58+00:00

I want to Create a new User using Custom Membership Provider but I don’t

  • 0

I want to Create a new User using Custom Membership Provider but I don’t want to use the default function that is created.

I don’t want to use this

Public Overrides Function CreateUser(ByVal username As String,
                                         ByVal password As String,
                                         ByVal email As String,
                                         ByVal passwordQuestion As String,
                                         ByVal passwordAnswer As String,
                                         ByVal isApproved As Boolean,
                                         ByVal providerUserKey As Object,
                                         ByRef status As System.Web.Security.MembershipCreateStatus) As System.Web.Security.MembershipUser
        Return Nothing
  End Function

Instead I want to use this

Public Overloads Function CreateUser(ByVal username As String,
                                         ByVal email As String,
                                         ByVal number As String,
                                         ByVal isApproved As Boolean,
                                          ByRef status As System.Web.Security.MembershipCreateStatus) As System.Web.Security.MembershipUser

So when I use second option I get this squiggly lines saying “Reference to a non-shared member requires an object reference“

I referenced the .dll correctly like this

Imports CustomProviders

But when I try to create a user as shown in this below image it doesn’t work. I am doing something clearly wrong. I don’t know what it is.

enter image description here

Resolved:
I found that the squiggly line was due to casting problem. I was referencing the class library member without casting in my web page code behind method. I think the other is also taken care off.

  • 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-21T12:46:59+00:00Added an answer on May 21, 2026 at 12:46 pm

    Hey, your code works (compiles okay with me) I just created a new membership provider and used your createuser method. It works Okay.

    If you just want to send less parameters, why dont you use optional parameter feature so that your caller’s can still call the method with limited parameters. This way you will automatically get out of your problem (which I am not sure what is 🙂 ?)

    http://msdn.microsoft.com/en-us/library/f25e2b6b(v=VS.100).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Visual Basic 9 (VS2008) I want to create new Tabs as and
I want to create a new row in my database on a table that
I want to create a new object using Class::DBI. One of the fields of
I want to create a new business application using the Django framework. Any suggestions
I want to create a new column in a MYSQL table that has Fn
What I'm trying to do is create a new custom data type that behaves
I'm using a winForm. I have 2 custom controls that I want to add
I want to create new node of BeanTreeView, and when I add some node
I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with
I want to create a new Subversion repository through Aptana Studio. Both Aptana SVN

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.