FormsAuthentication.SetAuthCookie函数使用无效

来源:互联网 发布:淘宝店铺可以改名吗 编辑:程序博客网 时间:2024/04/27 15:00
FormsAuthentication.SetAuthCookie无法改变Request.IsAuthenticated的状态
其原因可能是web.config中使用的验证模式是windows的,改为如下即可:
<authentication mode="Forms">
            <forms name=".ASPXAUTH" protection="All" timeout="60" />
</authentication>
原创粉丝点击