Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kurniawan Kurniawan 202 posts 225 karma points
    Aug 24, 2010 @ 08:42
    Kurniawan Kurniawan
    0

    CreateUserWizard using Umbraco membership Provider

    Hi,

    Any one get this error, when creating a user using Umbraco Membership Provider.

    I am using ASP.NET CreateUserWizard Control. but when I click Submit, I get this error.
    It seems there is error when it call umbraco membership provider,

    Any clue ?

     

    Thanks

     

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
    umbraco.cms.businesslogic.Content.CreateContent(ContentType ct) +188
    umbraco.cms.businesslogic.member.Member.MakeNew(String Name, String Email, MemberType mbt, User u) +603
    umbraco.providers.members.UmbracoMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +197
    System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +318
    System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +102
    System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +418
    System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +161
    System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Aug 24, 2010 @ 10:10
    Michael Latouche
    1

    Hi Kurniawan,

    I think this is because you need to specify a "MemberType" in your web.config MembershipProvider definition, and/or create this type in Umbraco.

    You can find more information about this in the following thread : http://our.umbraco.org/forum/developers/api-questions/11407-making-a-member-gives-an-object-reference-not-set-to-an-instance-error

    Cheers,

    Michael.

  • Kurniawan Kurniawan 202 posts 225 karma points
    Aug 24, 2010 @ 10:15
    Kurniawan Kurniawan
    0

    Do you know how to specify "MemberType" in web.config ?

    And Create this type in umbraco ?

     

    Thanks

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Aug 24, 2010 @ 10:22
    Richard Soeteman
    0

    Hi,

    In umbraco your create the MemberType in the members section. then you can go the the web.config file, search for UmbracoMembeshipProvider and there you find the defaultMemberShipAlias attribut.Rename that to the Membertype you have created in Umbraco. Below an example  

    Cheers,

    Richard

    <

     

    add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="leden" passwordFormat="Hashed" />

  • Kurniawan Kurniawan 202 posts 225 karma points
    Aug 25, 2010 @ 01:59
    Kurniawan Kurniawan
    0

    It's working now. Thanks for your help.

  • bob baty-barr 1180 posts 1294 karma points MVP
    Dec 16, 2010 @ 23:58
    bob baty-barr
    0

    can anyone give me a clue as to how to add the custom member properties to the asp.net create user wizard? i am at a complete loss.

  • Kurniawan Kurniawan 202 posts 225 karma points
    Dec 17, 2010 @ 00:31
  • bob baty-barr 1180 posts 1294 karma points MVP
    Dec 17, 2010 @ 00:37
    bob baty-barr
    0

    @Kurniawan

    that is a great tutorial, but i got that far... my issue is that i have added custom properties to the member and i want them to be able to fill them in on registration. I really was trying to avoid a custom control, but i may have to.

  • Kurniawan Kurniawan 202 posts 225 karma points
    Dec 17, 2010 @ 00:59
Please Sign in or register to post replies

Write your reply to:

Draft