MemberInfo not getting populated

Last post 05-31-2006 10:29 PM by jminond. 1 replies.

Sort Posts:

  • MemberInfo not getting populated

    05-31-2006, 8:40 PM
    • Member
      125 point Member
    • TonyS
    • Member since 12-09-2005, 5:53 AM
    • Posts 25

    I recently moved my club db from one hosting company to another.  In the process I lost the MemberInfo table.  I readded it and inserted rows with the memberid from the aspnet_Membership.  I tested to make sure I could update my items and no problem.  However now it will not update and when I create a new user the following happens.

    When I create a new user the user gets created in   aspnet_Membership,aspnet_Users, but it doesn't add the information from step 2 to the MemberInfo table and doesn't produce an error.  It returns the user added succesfully message.  However it never sets the isapproved field to True so I know its not getting to the line UserisApproved=True.  When I debut all my fields have values in it in the insert line execpt the GUID...

     

    Any ideas?

    Protected Sub CreateUserFinished(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs)

    Try

    Dim null As New Nullable(Of Integer)

    Dim da As New DataSetTableAdapters.MemberInfoTableAdapter

    Dim user As MembershipUser = Membership.GetUser(CreateUserWizard1.UserName)

    da.Insert(

    CType(user.ProviderUserKey, Guid), Addr.Text, Phone.Text, fname.Text, lname.Text, CType(DOB.Text, Global.System.Nullable(Of Date)))

    user.IsApproved =

    True

    Membership.UpdateUser(user)

    FormsAuthentication.SetAuthCookie(CreateUserWizard1.UserName,

    False)

    'Response.Redirect("default.aspx")

    Catch ex As Exception

    'Membership.DeleteUser(UserName.Text)

    ErrorMessage.Text =

    "Could not create user record: " & ex.Message

    End Try

    End Sub 
     Protected Sub CreateUserFinished(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs)
            Try
                Dim null As New Nullable(Of Integer)
                Dim da As New DataSetTableAdapters.MemberInfoTableAdapter
                Dim user As MembershipUser = Membership.GetUser(CreateUserWizard1.UserName)
                da.Insert(CType(user.ProviderUserKey, Guid), Addr.Text, Phone.Text, fname.Text, lname.Text, CType(DOB.Text, Global.System.Nullable(Of Date)))
                user.IsApproved = True
                Membership.UpdateUser(user)
                FormsAuthentication.SetAuthCookie(CreateUserWizard1.UserName, False)
                'Response.Redirect("default.aspx")
    
            Catch ex As Exception
                'Membership.DeleteUser(UserName.Text)
    
                ErrorMessage.Text = "Could not create user record: " & ex.Message
            End Try
        End Sub
     
  • Re: MemberInfo not getting populated

    05-31-2006, 10:29 PM
    • Contributor
      2,898 point Contributor
    • jminond
    • Member since 07-21-2003, 2:33 PM
    • New York
    • Posts 608

    Read scott's post on application name:

    maybe it's related? if not.. i dont know enough about the membership provider... but plenty of people do so no worries ;-)

    Jonathan Minond
    http://www.Jonavi.com
    http://www.jonavi.com/Default.aspx?pageID=21
    http://RainbowBeta.com
    http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/default.aspx
    http://dotnetslackers.com/community/blogs/jminond/default.aspx
Page 1 of 1 (2 items)