Question

I am manually creating users in my asp.net user tables with the membership.creatuser(). Is there an easy way to test to make sure the account is created and or valid after I create it?

MembershipCreateStatus status = new MembershipCreateStatus();
Membership.CreateUser(user.FirstName + user.LastName, 
                       user.Password, user.Email);

I would basically like to do an auto sign in to the site and then return if it was successful or not?

Any links or ideas would be greatly appreciated.

Thanks

Was it helpful?

Solution

Well, the CreateUser() method has an out parameter that will return a MembershipCreateStatus enum with details about what happened. Anything other than Success from that enum indicates a potential problem.

I see you've declared your status variable, you just need to use it!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top