if (FormsAuthentication.GetRedirectUrl(customerID, false).ToLower().EndsWith("default.aspx")) {
FormsAuthentication.SetAuthCookie(customerID, false);
Response.Redirect("VerifySignIn.aspx");
}
else {
FormsAuthentication.RedirectFromLoginPage(customerID, false);
}
FormsAuthentication.SetAuthCookie(customerID, false);
Response.Redirect("VerifySignIn.aspx");
}
else {
FormsAuthentication.RedirectFromLoginPage(customerID, false);
}
如果操作成功返回上次用户访问的页面
并写入cookie集合当中
否则
将已身份验证的用户重定向起初的URL....
FormsAuthentication.SignOut();移除身份验证票