Forms 验证怎么样设置为当前窗口有效?
如题我现在是这样写的不过关闭ie后再打开还是登录状态,我想实现关闭后即失效应该怎么样设置请高手指点
FormsAuthenticationTicket Ticket = new FormsAuthenticationTicket(
1,
this.txtUserName.Text,
DateTime.Now,
DateTime.Now.AddDays(1),
false,
Customer,
FormsAuthentication.FormsCookiePath);
string HashTicket = FormsAuthentication.Encrypt(Ticket);
HttpCookie UserCookie = new HttpCookie(FormsAuthentication.FormsCookieName, HashTicket);
Context.Response.Cookies.Add(UserCookie);
httpcookie没设置 expires ....