Hi,
I am using Forms authentication in one of my web application. Following are the code i am using in
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
}
}
c. Global.asax
Application_OnPostAuthenticateRequest()
{
if (user.Authenticated && Authenticationtype="form")
{
// Fetch roles and user data and save in httpcontext
}
}
I don't know i am right or not. I have doubt in Login.aspx page and Global.asax page
I am not using SSL because its paid digital certificate. So how can i make data safe transfer and should i use authentication cookies as a file or as a url? how can i find cookie file at client and at server PC?
Is there any link from which i get best way to use form authentication?