I need to implement the common 'New Account' pattern (in .net MVC) where:
Is there a best practices recognized or sample site that can guide my way?
thx much
EDIT: Note that i'm trying to drill into a deeper pattern here than just comparing a submitted password against a stored password.
Also please note that I'm not attempting any reference to Windows Workflow here. The title uses workflow in a generic sense only.
thx
Authentication. Authentication of user means verifying the identity of the user. This is really important. You might need to present your application only to the authenticated users for obvious reasons. Let's create a new ASP.Net MVC application.
Home Controller Class Contain two Action methods. First Action method is [HttpGet], when you run the application this method will execute. Second Action method is [HttpPost], when user clicks Create button this Action method will execute.
Implementing a Membership Provider
MSDN Membership Provider
Overriding a method, say the Create User Method
MSDN Membership.CreateUser()
All you need to do is inherit the AspNetMembershipProvider, override the CreateUser method and implement custom code:
public class MyNewMembershipProvider : AspNetMembershipProvider
{
public override MembershipUser CreateUser(
string username,
string password,
string email,
string passwordQuestion,
string passwordAnswer,
bool isApproved,
Object providerUserKey,
out MembershipCreateStatus status)
//Do whatever you need to do
SendUserValidationMessage(emailAddress, responseMessage,
options, etc, whatever);
return base.CreateUser(username, password, email,
passwordQuestion, passwordAnswer,
isApproved, providerUserKey, out status)
}
}
I hope this helps. I think WF may be too much for something like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With