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

  • Home
  • SEARCH
  • 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 8266053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:01:13+00:00 2026-06-08T05:01:13+00:00

Source Error: Line 55: MembershipUser User = Membership.GetUser(UserNameTextBox.Text); Line 56: Line 57: Object UserGUID=

  • 0
Source Error: 

Line 55:                MembershipUser User = Membership.GetUser(UserNameTextBox.Text);
Line 56:   
Line 57:                Object UserGUID= User.ProviderUserKey; //error appeared here
Line 58:   
Line 59:                DataSource.InsertParameters.Add("UserId", UserGUID.ToString());

I had a additional steps in createuserwizard, and upon completing the form, it would stored user info inside the DB. However this error occured :

Object reference not set to an instance of an object.

I had also set a breakpoint to link 55, 57, 59. And from line 57, User are null, they could not get the User from the DB.

Code behind :

protected void CreateUserWizard1_CreatedUser(object sender, System.Web.UI.WebControls.LoginCancelEventArgs e)
    {  
       MSCaptcha.CaptchaControl Captcha1 = (CreateUserWizardStep1.ContentTemplateContainer.FindControl("Captcha1") as MSCaptcha.CaptchaControl);

       TextBox txtCaptcha = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("txtCaptcha");
       Label Captchalbl = (Label)CreateUserWizardStep1.ContentTemplateContainer.FindControl("Captchalbl");

       Response.Write(txtCaptcha.Text); 

           Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim()); 

           if (!Captcha1.UserValidated)
           {

                Captchalbl.Text = "InValid";

               e.Cancel = true;
           } 
            else
           {
               Captchalbl.Text = "Valid";

               TextBox UserNameTextBox =
              (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName");

               SqlDataSource DataSource =
                   (SqlDataSource)CreateUserWizardStep1.ContentTemplateContainer.FindControl("InsertExtraInfo");

               MembershipUser User = Membership.GetUser(UserNameTextBox.Text);

               Object UserGUID= User.ProviderUserKey; //here is link 57. 

               DataSource.InsertParameters.Add("UserId", UserGUID.ToString());

               DataSource.Insert();

            }
   }
  • 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-06-08T05:01:14+00:00Added an answer on June 8, 2026 at 5:01 am

    Although this method name is “CreateUserWizard1_CreatedUser”, I can see it is for the CreatingUser event because of its signature. During this event the user has not been created yet. Use the CreatedUser event for that.

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

Sidebar

Related Questions

Source Error: Line 62: <asp:CreateUserWizard ID=CreateUserWizard1 // error appeared here Line 63: runat=server Line
Rebol tells the error and the line but it doesn't say in what source
you can view full source code here dpaste.com/hold/167199 Error: delete() takes exactly 2 arguments
An odd error here, perhaps someone can help track down source as it's attempting
Compiler Error Message: CS1002: ; expected Source Error: Line 56: </div><!--end #Asset--> Line 57:
Parser Error Message: The server tag is not well formed. Source Error: Line 27:
I am trying to update a user information and get the following error: Object
Parser Error Message: The entry 'SiteSqlServer' has already been added. Source Error: Line 23:
I am getting the following error at this line of code... MembershipUser newuser =
I get the error Data Source cannot be empty. Use :memory: to open an

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.