在登录控件里已经设置了e.Authenticated = true;
但User.Identity.IsAuthenticated总是为false
web.config有什么设置?
<authentication mode="Forms">
<forms name="myAuthentication" loginUrl="Default.aspx" timeout="60" cookieless="AutoDetect" />
</authentication>
但User.Identity.IsAuthenticated总是为false
web.config有什么设置?
<authentication mode="Forms">
<forms name="myAuthentication" loginUrl="Default.aspx" timeout="60" cookieless="AutoDetect" />
</authentication>
方法登陆后就为true ,你登录的时候用这个方法登陆
其实就是写一个Cookie而已
也可以用System.Web.Security.FormsAuthentication.SetAuthCookie