asp.net形成认证安全问题

时间:2010-05-05 20:51:09

标签: asp.net security forms-authentication

我有一种asp.net表单身份验证,其代码如下:

FormsAuthentication.SetAuthCookie(account.Id.ToString(), true);
HttpContext.Current.User = new GenericPrincipal(new GenericIdentity(account.Id.ToString()), null);

我应该采取哪些额外的措施来使身份验证cookie(即用户ID)更安全? (https,例如编码)

提前谢谢!

1 个答案:

答案 0 :(得分:1)

要获得高安全性,您应该在web.config中启用ssl: