HttpContext.Current.User and System.Threading.CurrentPrincipalhttp://forums.asp.net/t/1773714.aspx/1?HttpContext+Current+User+and+System+Threading+CurrentPrincipalSat, 25 Feb 2012 14:20:26 -050017737144850500http://forums.asp.net/p/1773714/4850500.aspx/1?HttpContext+Current+User+and+System+Threading+CurrentPrincipalHttpContext.Current.User and System.Threading.CurrentPrincipal <p>What is the difference between HttpContext.Current.User and System.Threading.CurrentPrincipal for an aspx page on a Windows 7 IIS running with Windows Authentication?&nbsp; What are the situations when these two will be different.</p> <p>Thanks.</p> 2012-02-25T10:54:38-05:004850671http://forums.asp.net/p/1773714/4850671.aspx/1?Re+HttpContext+Current+User+and+System+Threading+CurrentPrincipalRe: HttpContext.Current.User and System.Threading.CurrentPrincipal <p>None in theory. For .NET, Thread.CurrentPrincipal is always the &quot;goto&quot; place to find out who the current user is. When ASP.NET was developed they wanted a slightly more convenient place to access this information, so they made HttpContext.User (and yes, it is redundant). So they're always supposed to be in sync.</p> <p>If you ever write any code to assign either of these, then you should set both. An example of this would be assiging roles for a user in Application_PostAuthenticateRequest. If you mess that up, then that's the scenario where these would not be the same value and I would consider that a bug.</p> <p></p> 2012-02-25T14:20:26-05:00