之间有什么HttpContext.Current.Request.IsAuthenticated和HttpContext.Current.User.Identity.IsAuthenticated区别? [英] What is the difference between HttpContext.Current.Request.IsAuthenticated and HttpContext.Current.User.Identity.IsAuthenticated?
本文介绍了之间有什么HttpContext.Current.Request.IsAuthenticated和HttpContext.Current.User.Identity.IsAuthenticated区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是HttpContext.Current.Request.IsAuthenticated和HttpContext.Current.User.Identity.IsAuthenticated?
What is the difference between HttpContext.Current.Request.IsAuthenticated and HttpContext.Current.User.Identity.IsAuthenticated?
您会在什么情况下使用哪一种?
Which one would you use in which situation?
推荐答案
有绝对没有区别。结帐HttpContext.Current.Request.IsAuthenticated实现:
There's absolutely no difference. Checkout HttpContext.Current.Request.IsAuthenticated implementation:
public bool IsAuthenticated
{
get
{
return (((this._context.User != null) &&
(this._context.User.Identity != null)) &&
this._context.User.Identity.IsAuthenticated);
}
}
这篇关于之间有什么HttpContext.Current.Request.IsAuthenticated和HttpContext.Current.User.Identity.IsAuthenticated区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文