What is the difference between HttpContext.Current.Request.IsAuthenticated and HttpContext.Current.User.Identity.IsAuthenticated?
asp.net
Solution
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);
}
}
Problem
What is the difference between HttpContext.Current.Request.IsAuthenticated and HttpContext.Current.User.Identity.IsAuthenticated? Which one would you use in which situation?