locked
Where does aspnet_Membership_CreateUser get called??? RRS feed

  • Question

  • User1628746328 posted

    I'm trying to figure out where this stored procedure gets called.

    aspnet_Membership_CreateUser

    Can anyone tell me?

    It seems in this application there are 4 tables that get updated when a new user gets created, however it's difficult for me to tell how this actually is implemented when I step through the code on a Member Creation event.

    I seems to do this:

    userProfile.Save();

    the Members.CS gets involved:

    public static int CreateMember(string username, string aspApplicationName)

    {

    DateTime dateCreated = DateTime.Now;

    // All users are added to Guests role upon registration.

    Roles.AddUserToRole(username, "Guests");using (MembersDataAdapter db = new MembersDataAdapter())

    {

    return (int)db.InsertMember(username, aspApplicationName, dateCreated);

    }

    }

    But that's where it seems that I can get any deeper into the architecure..

    My problem really stems from this post:

    http://forums.asp.net/myforums.aspx

    thanks.

     

    doug

     

     

    Saturday, October 4, 2008 9:32 AM

Answers

  • User-470797114 posted

     Friend, SqlMembershipProvider.CreateUser calls the stored procedure aspnet_Membership_CreateUser to create new membership users. Before calling the stored procedure, SqlMembershipProvider.CreateUser validates the input parameters, encodes the password (and, if present, the password answer) provided to it, and fires an OnValidatingPassword event.

    For more info, refer here : http://msdn.microsoft.com/en-us/library/aa478949.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 4, 2008 10:21 AM

All replies

  • User-470797114 posted

     Friend, SqlMembershipProvider.CreateUser calls the stored procedure aspnet_Membership_CreateUser to create new membership users. Before calling the stored procedure, SqlMembershipProvider.CreateUser validates the input parameters, encodes the password (and, if present, the password answer) provided to it, and fires an OnValidatingPassword event.

    For more info, refer here : http://msdn.microsoft.com/en-us/library/aa478949.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 4, 2008 10:21 AM
  • User1628746328 posted

    can you tell me if there's some reason that this Stored Procedure wouldn't get called in this scenario?

     

    Because the free decision is working, however if the user chooses for a pay service, and comes back from PayPal, all of the tables

    a) aspnet_membership

    b). aspnet_profile

    c). aspnet_users

    d). aspnet_UsersInRoles

    e). members

    Except for a). aspnet_membership, are being populated.

    I've spent about two months trying to figure this out..and am about to give up.

    Saturday, October 4, 2008 11:51 AM
  • User1628746328 posted

     

    i checked the msdn link you provided..

    It says that the process goes something like this:

    -----------------------------------------------------------------------------------------------------

    SqlMembershipProvider.CreateUser calls the stored procedure aspnet_Membership_CreateUser to create new membership users. Before calling the stored procedure, SqlMembershipProvider.CreateUser validates the input parameters, encodes the password (and, if present, the password answer) provided to it, and fires an OnValidatingPassword event. Then aspnet_Membership_CreateUser performs the following tasks:

    1. Calls the stored procedure aspnet_Applications_CreateApplication to convert the application name passed to it (which comes from the provider's ApplicationName property) into an application ID. If the application name already appears in the aspnet_Applications table, aspnet_Applications_CreateApplication returns the existing application ID. If the application name is not already present in the aspnet_Applications table, aspnet_Applications_CreateApplication adds a new application to aspnet_Applications and returns the application ID.
    2. Calls aspnet_Users_CreateUser to insert a record representing the new user into the aspnet_Users table.
    3. Performs an optional check to ensure that the new user's e-mail address is unique with respect to other registered e-mail addresses.
    4. Updates the LastActivityDate field in the aspnet_Users table with the current time and date.
    5. Inserts a record representing the new user into the aspnet_Membership table.

    aspnet_Membership_CreateUser performs all these steps within a transaction to ensure that changes are committed as a group or not at all.

    --------------------------------------------------------------------------------

    If the process is done in a transaction, why are some tables populated and some are not???

    I do have a record in aspnet_users (STEP 2), there's a last activity date timestamp(STEP 4) however there's not a corresponding record in aspnet_membership (STEP 5)...

    any ideas?

    thanks.

    doug

     

    Saturday, October 4, 2008 1:00 PM
  • User1628746328 posted

    anybody?

    a little help???

     

     

    Sunday, October 5, 2008 5:58 PM
  • User730446648 posted

    Have you thought about just storeing your user type in the classifieds database in the members table?
    I find that every bit as secure, and a hell of a lot easier.

    Also there is a starter kit for ecommerce thrpough paypal.
    That might give you ideas.

    Good Luck

     

    Sunday, October 5, 2008 9:26 PM
  • User1628746328 posted

    well..

    the first scenario stores info in aspnet_membership fine.

    it's when the user leaves to go to paypal the membership info doesn't get stored.

    It seems hard for me to believe that since this storage is all done in a transaction, that there's nothing stored in the aspnet_membership table.  Just doesn't make sense,

    I've tried to debug it, however since I'm leaving the app tp go tp PayPal, when it returns to the app from PayPal, it the debugger won't pick up where it left off.

    Is there a way to debug an ASP.Net app in this scenario?

    dd

    Saturday, October 11, 2008 1:58 PM