Re: Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 12/13/04


Date: Mon, 13 Dec 2004 11:14:08 -0600

Page.User.Identity.Name will be the name of the user who authenticated with
the site, assuming they used one of the supported authentication mechanisms
(Windows, Forms, Passport). Note that this use can be a Windows user
(WindowsPrincipal/WindowsIdentity), but it could also be any other
IPrincipal as well.

WindowsIdentity.GetCurrent().Name is the WindowsIdentity that the current
thread is executing under. It controls what security context is used by
unmanaged code, such as accessing files, SQL or AD. It will either be the
process account or an impersonated account.

The two will be the same thing if you are using impersonation with ASP.NET
and are using Windows authentication. Otherwise, they can be different.

HTH,

Joe K.

"Shary" <junglesnake@gmail.com> wrote in message
news:99ef4d4.0412111239.322eb802@posting.google.com...
> What is the difference between
> Page.User.Identity.Name
> and
> WindowsIdentity.GetCurrent().Name
>
> In what scenarios would I use one or the other?



Relevant Pages

  • Re: Change in ASP.Net authentication between Win2000 and Win2003
    ... > is turning on/off Kerberos is occuring. ... It control how IE deals with "Authentication: ... when you put IIS6 in a domain and have "Integrated Windows Authentication" ...
    (microsoft.public.windows.server.security)
  • Re: Change in ASP.Net authentication between Win2000 and Win2003
    ... > is turning on/off Kerberos is occuring. ... It control how IE deals with "Authentication: ... when you put IIS6 in a domain and have "Integrated Windows Authentication" ...
    (microsoft.public.inetserver.iis.security)
  • Re: Need help configuring Wireless Connection profile
    ... and I can only use the intel OR windows utility, not both at the same time. ... Windows authentication for all users,4129,LRG\ryanv,4149,Wireless WPA2 ... SMALL BUSINESS SERVER: ... STEP #1 Install Certificate Services ...
    (microsoft.public.windowsxp.general)
  • Re: form authentication and webservices
    ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... We will be using Windows Authentication on the Web Services side (same ... Dominick Baier ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Beginners Questions
    ... We do use Windows form on the presentation layer which is on ... terminal server and call web services on the business logic side. ... of using "proxy" authentication on SQL Server. ... > I have written an app with a Windows Forms UI that is deployed to clients ...
    (microsoft.public.dotnet.distributed_apps)