2010-12-10 9 views
0

mvc2에서 웹 사이트를 개발 중이며 .net 인증을 사용하고 있습니다. 이메일과 비밀번호를 사용하기 위해 로그인 인증을 변경하려면 어떻게해야합니까?.Net 폼 인증

감사

인증 쿠키 그냥 메일이 암호와 일치하는지 확인 및 인증 쿠키에 대한 사용자 이름과 이메일을 사용 방출 컨트롤러 액션 내부

답변

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 

}