leo*_*ora 10 membership asp.net authentication
我有一个用户注册但是IsApproved是假的,但当我检查Request.IsAuthenticated时它仍然返回true.
你知道这会怎么样吗?
Ric*_*lay 18
HttpRequest.IsAuthenticated如果HttpContext.User.Identity不为空,它的IsAuthenticated属性返回true,则返回true.
当前标识在FormsAuthenticationModule中设置,但它与MembershipProvider无关.实际上,它甚至没有引用它.它只是检查验证cookie是否仍然设置并且仍然有效(因为,尚未过期).
我认为问题是您正在调用其中一个FormsAuthentication方法,如RedirectFromLoginPage,这是设置身份验证cookie.如果您需要等到用户获得批准,那么您需要确保没有设置cookie.
| 归档时间: |
|
| 查看次数: |
19408 次 |
| 最近记录: |