웹 응용 프로그램 중 하나에서 폼 인증을 사용하고 있습니다. 다음은 내가 사용하고있는 코드입니다.ASP.NET 2.0의 폼 인증
a. 의 Web.config
forms loginurl="***" defaulturl="***"
B. Login.aspx
OnAuthenticate(object sender, AuthenticateEventArgs e)
{
e. Authenticated = validateuser(Login1.UserName, Login1.Password)
if (e.Authenticated =true)
{
// fetch roles
}
}
다. Global.asax에
Application_OnPostAuthenticateRequest()
{
if (user.Authenticated && Authenticationtype="form")
{
// Fetch roles and user data and save in httpcontext
}
}
난 내가 오른쪽이나하지 않다 모른다. Login.aspx 페이지와 Global.asax 페이지에 의심의 여지가 있습니다.
유료 디지털 인증서이기 때문에 SSL을 사용하지 않습니다. 그렇다면 어떻게 데이터를 안전하게 전송할 수 있으며 인증 쿠키를 파일이나 URL로 사용해야합니까? 클라이언트와 서버 PC에서 어떻게 쿠키 파일을 찾을 수 있습니까?
양식 인증을 사용하는 가장 좋은 방법은 무엇입니까?