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