摘要:
1,设置IIS为可匿名访问和asp.net web.config中设置为form验证2,检索数据存储验证用户,并检索角色(如果不是基于角色可不用)3,使用FormsAuthenticationTicket创建一个Cookie并回发到客户端,并存储角色到票中,如:FormsAuthentication.SetAuthCookie(Username,true false)cookies保存时间:HttpContext.Current.Response.Cookies[FormsAuthentication.FormsCookieName].EXPires=DateTime.Now.AddDays( 阅读全文
posted @ 2011-07-14 16:37
茶海
阅读(867)
评论(0)
推荐(0)
浙公网安备 33010602011771号