Ask a Question related to ASP.NET Security, Design and Development.
-
Shary #1
Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name
What is the difference between
Page.User.Identity.Name
and
WindowsIdentity.GetCurrent().Name
In what scenarios would I use one or the other?
Shary Guest
-
Access Denied on WindowsIdentity.GetCurrent()
Hi, I am developing an ASP.NET Application in C#. I need to find out the user under which the process is running on runtime. So I use... -
Access is denied in WindowsIdentity.GetCurrent
I am suddenly getting this on a couple of Windows XP (.NET 1.1) machines in my environment. The machines haven't change, and my code hasn't... -
*** User.Identity.Name
After a user logging on, User.Identity.Name contains domain/logon name of the current user. How to get other information of the current user such as... -
User.Identity.Name
Hi, I am using Forms authentication -in which - I am trying to use User.Identity.Name, i am getting the user name in this field even after i... -
Old ASP Windows User Identity
Is there a way in ASP (3.0, not .NET) for me to determine who the current windows users is (i.e. the user who was authenticated and who is... -
Daniel Fisher\(lennybacon\) #2
Re: Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name
Hi Shary
Page.User.Identity.Name can also return the name of a user logged in with
FormsAuthentication or Passport.
--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: [url]http://www.lennybacon.com/[/url]
"Shary" <junglesnake@gmail.com> wrote in message
news:99ef4d4.0412111239.322eb802@posting.google.co m...> What is the difference between
> Page.User.Identity.Name
> and
> WindowsIdentity.GetCurrent().Name
>
> In what scenarios would I use one or the other?
Daniel Fisher\(lennybacon\) Guest
-
Joe Kaplan \(MVP - ADSI\) #3
Re: Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name
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.co m...> What is the difference between
> Page.User.Identity.Name
> and
> WindowsIdentity.GetCurrent().Name
>
> In what scenarios would I use one or the other?
Joe Kaplan \(MVP - ADSI\) Guest
-
Nicole Calinoiu #4
Re: Page.User.Identity.Name vs. WindowsIdentity.GetCurrent().Name
You might want to take a look at
[url]http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetAP05.asp[/url]. It
contains descriptions of the principal and identity objects used by ASP.NET,
as well as their expected values under various combinations of IIS and
ASP.NET authentication schemes.
HTH,
Nicole
"Shary" <junglesnake@gmail.com> wrote in message
news:99ef4d4.0412111239.322eb802@posting.google.co m...> What is the difference between
> Page.User.Identity.Name
> and
> WindowsIdentity.GetCurrent().Name
>
> In what scenarios would I use one or the other?
Nicole Calinoiu Guest



Reply With Quote

