我写的登录页面,用的是form验证。我在公司的电脑上试的可以,没有问题。
在家的电脑上,老是登录不上去。
家里电脑的IE安全设置的是中,隐私也是中。我写了个cookie进去,在读出来,也没问题。
是不是家里电脑还要进行什么设置?我的web.config
<authentication mode="Forms">
<forms name="XueHn" loginUrl="XHAdmin/Default.aspx" protection="All" />
</authentication>
登录时的程序。
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, UserName.Text.ToLower(), DateTime.Now, DateTime.Now.AddMinutes(60), false, UserName.Text.ToLower());//创建一个验证票据
                string cookieStr = FormsAuthentication.Encrypt(ticket);
                HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, cookieStr);
                Response.Cookies.Add(cookie);
                Response.Redirect("Frame/Main.aspx");