FormsAuthentication.SetAuthCookie
2010-09-06 14:43
393 查看
当没有用自带的登陆控件进行验证登陆时,会导致页面一直需要验证,因为页面COOKIE中没有值.
必须在用户登陆验证成功后将用户的登陆ID值付给AuthCookie...
FormsAuthentication.SetAuthCookie(txtUserID.Text, false);
FormsAuthentication.RedirectFromLoginPage的第二个参数,true表示保留持久cookie,过期时间就是web.config里的时间,如果是false则关闭浏览器就过期。
必须在用户登陆验证成功后将用户的登陆ID值付给AuthCookie...
FormsAuthentication.SetAuthCookie(txtUserID.Text, false);
FormsAuthentication.RedirectFromLoginPage的第二个参数,true表示保留持久cookie,过期时间就是web.config里的时间,如果是false则关闭浏览器就过期。
相关文章推荐
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie 方法登录
- Asp.net MVC Form认证,IIS改成集成模式后,FormsAuthentication.SetAuthCookie无效,Request.IsAuthenticated值,始终为false,页面提示HTTP 错误 401.0 - Unauthorized,您无权查看此目录或页面
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie Method
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- FormsAuthentication.SetAuthCookie Method
- FormsAuthentication.SetAuthCookie
- MVC4 Forms 验证,部署到Hyper-v上.FormsAuthentication.SetAuthCookie无效的问题
- MVC .NET的FormsAuthentication.SetAuthCookie在IE10中无效的问题
- FormsAuthentication.SetAuthCookie是必须写的吗?
- ios中mvc的FormsAuthentication.SetAuthCookie(cookieUserName, false)失败
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- 自己实现FormsAuthentication.SetAuthCookie方法,怎样在ASP.NET服务端代码中删除客户端Cookie
- FormsAuthentication.SetAuthCookie函数使用无效
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- IE10下 FormsAuthentication.SetAuthCookie无效的问
- FormsAuthentication.SignOut(); FormsAuthentication.SetAuthCookie(u.UserName, false);