I have a lot of time with this subscription item
OK, so, It's really weird. I can register a user. I can register, I can login however, when I am going to register another user then the user is not saved in the database and I get a membership authentication verification failure event when the user Tries to login (I think because the user can never be saved).
Here I am using
to save a new user:
Secure Zero btnRegister_Click (Object Sender, EventArgs E ) {If (wrong == valid page ()) back; FormsAuthentication.SignOut (); Membership status status status; Data User User = UserManager.Credited User (TSTEEML text.Rim (), TCTP password text, rim (), status out); Switch (status) {Case membership status. Success: UserManager.Save (user); break; Default: lblMessage.Text = status.ToString (); break; } Response.Redirect ("~ / login.aspx"); } CreateUser method: Public Static User CreateUser (String Username, String Password, Out Subscription Subscription Status) {Use (TransactionScope transaction = New TransactionScope) ) {Subscriber aspnetUser = membership Crete user (user name, password, username, blank, blank, truth, outside status); User hqUser = null; If (status == membership ranked status.Success) {hqUser = new user (); // These properties are for issues only / which will not blow. They can be safely removed from the system // Aspnet subscription tables take care of this stuff for us. HqUser.LastLoginDate = DateTime.Now; HqUser.DateCreated = DateTime.Now; // end rightites: HqUser.Email = username; HqUser.MembershipID = (Guid) aspnetUser.ProviderUserKey; Save (hqUser); } Transaction.Complete (); Return hk user;
}}
There is an additional savings method to save in the user's app database even though the user is not getting into the membership database, although I know before It is only dying
Is anyone clear that I am burning? Thanks!
Have you noticed that this is not a problem with the complexity of the password? I know that I have issues with past issues with it ...
Comments
Post a Comment