protected void Page_Load(object sender, EventArgs e) { Services.AuthenticationService service = new SecurityCheck.Services.AuthenticationService(); service.Logout(); Response.Redirect("~/Default.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Services.AuthenticationService service = new SecurityCheck.Services.AuthenticationService(); service.Prepare(); } }
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { Services.AuthenticationService service = new SecurityCheck.Services.AuthenticationService(); if (service.Authenticate(LoginUser.UserName, LoginUser.Password)) { // session idが変わるのを確認するためのダミーデータ Session["bar"] = DateTime.Now; FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, LoginUser.RememberMeSet); } }