문제

What's the difference between SimpleMembershipProvider.CreateAccount and SimpleMembershipProvider.CreateUser ? Which one should i use ? Also, WebSecurity only has createAccount and createAccountAndUser, why isn't there a createUser alone?

도움이 되었습니까?

해결책

CreateUser will create a new user in the User table, CreateAccount will create an account in the account table, based on an existing User - you can't create an account until a user is created.

http://msdn.microsoft.com/en-us/library/gg538405(v=vs.111).aspx

http://msdn.microsoft.com/en-us/library/webmatrix.webdata.simplemembershipprovider.createuser(v=vs.111).aspx

The CreateUserAndAccount will create both in a single step: http://msdn.microsoft.com/en-us/library/gg548257(v=vs.111).aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top