Re: HttpContext.Current.User.Identity.IsAuthenticated
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 10/17/05
- Next message: paul_at_domainscanners.com: "Re: HttpContext.Current.User.Identity.IsAuthenticated"
- Previous message: Dominick Baier [DevelopMentor]: "Re: integrated login and folder permissions"
- In reply to: paul_at_domainscanners.com: "HttpContext.Current.User.Identity.IsAuthenticated"
- Next in thread: paul_at_domainscanners.com: "Re: HttpContext.Current.User.Identity.IsAuthenticated"
- Reply: paul_at_domainscanners.com: "Re: HttpContext.Current.User.Identity.IsAuthenticated"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 17 Oct 2005 10:20:06 -0700
Hello paul@domainscanners.com,
no - the IPrincipal on Context.User is created in the AuthenticateRequest
event - you are doing a normal Property lookup.
code for GenericIdentity:
public virtual bool IsAuthenticated
{
get
{
return !this.m_name.Equals("");
}
}
code for FormsIdentity:
public bool IsAuthenticated
{
get
{
return true;
}
}
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Hi,
>
> Quick question - does
> HttpContext.Current.User.Identity.IsAuthenticated perform a hit on the
> database if using forms authentication?
>
> Just wondering if I should perform this once when a user logs into my
> site then store in a session as to not repeatidly hit the database as
> the user navigates around my site.
>
> Thanks v much,
>
> Paul.
>
- Next message: paul_at_domainscanners.com: "Re: HttpContext.Current.User.Identity.IsAuthenticated"
- Previous message: Dominick Baier [DevelopMentor]: "Re: integrated login and folder permissions"
- In reply to: paul_at_domainscanners.com: "HttpContext.Current.User.Identity.IsAuthenticated"
- Next in thread: paul_at_domainscanners.com: "Re: HttpContext.Current.User.Identity.IsAuthenticated"
- Reply: paul_at_domainscanners.com: "Re: HttpContext.Current.User.Identity.IsAuthenticated"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|