0 赞 0 踩
其他回答
你确定你SignIn了吗。。。 热心网民 1小时前 0条评论
0 赞 0 踩
In short, the User object is set earlier in the http://ASP.NET pipeline, long before the requested http://ASP.NET page's code is executed. Now, on thesubsequent visit, the http://ASP.NET runtime will see the forms authentication ticket and User.Identity.IsAuthenticated will be true, but not on this request.
I really hope this makes sense.
In any event, in the LoggedIn event handler there's no need to check if the user is authenticated - you already know they are! The LoggedIn event wouldn't fire otherwise. Also, you won't be able to get the username from User.Identity.Name. Instead, use LoginControlID.Username.
Happy Programming!
热心网民 1小时前 0条评论 0 赞 0 踩
登录后可回答 提交回答
关键词 :
- 上一个:到底要不如随大流和他人一样熬夜,消费一样多之日子上?
- 下一个:INTP男生,面临择业,怎选择?目前选择:汽车/游戏策划
推荐资讯
点击排行