2010-12-10 14 views
0

私はmvc2でウェブサイトを開発しています。私は.net認証を使用しています。電子メールとパスワードを使用するようにログイン認証を変更するにはどうしたらいいですか?.Netフォーム認証

おかげだけでメールがパスワードと一致するかどうかを確認し、認証Cookieのユーザー名として電子メールを使用する認証Cookieを発するあなたのコントローラのアクション内

答えて

1

[HttpPost] 
public ActionResult Login(string email, string password) 
{ 
    // TODO: query your membership provider and verify if the given email 
    // matches the password and if they match emit the authentication cookie 
    // using the email as username 

}