WindowsPrincipal and aspnet user



I haven't been able to find a clear explanation on this one. Using
Visual Studio 2005, on my test environment (windows xp) the following
code returns the user who is logged into windows. However on the server
(Windows 2000 server service pack 4) it returns the aspnet account.
Both are set to disallow anonymous access and use Integrated
Windows authentication.

Any thoughts on how I can get the username of the person hitting the
website would be great.

The problem goes beyond this in that I need to check and see if
this user is part of a specific group on the machine, but my root cause
seems to be that I am not getting the correct user in the first place.


WindowsPrincipal wp = new
WindowsPrincipal(WindowsIdentity.GetCurrent());
string userName = wp.Identity.Name;

.



Relevant Pages

  • Cannot view a mailbox folder and reset password of users problem
    ... windows 2000 server service pack 4 ... and i immediately change the outlook express 's ... However, when i change the outlook express's with old password, it can ...
    (microsoft.public.exchange.admin)
  • Remote access wizard keeps failing
    ... When I try and run remote access wizard to set up a vpn it fails every time ... (this stops all internet access). ... I installed everything off windows update that was available. ... for KBXXXXXXX but none explicitely say windows 2003 server service pack 1 so ...
    (microsoft.public.windows.server.sbs)
  • Re: WindowsPrincipal and aspnet user
    ... on my test environment (windows xp) the following code returns the user who is logged into windows. ... However on the server (Windows 2000 server service pack 4) it returns the aspnet account. ... string userName = wp.Identity.Name; ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Windows 2003 Service Pack Download Site?
    ... Can anyone direct me to the FTP site to download the last complete network version of Windows 2003 server service pack? ...
    (microsoft.public.windows.server.general)
  • Re: Slow booting xp home.
    ... Changing the boot order to boot first from your hard disk might save you a half second, but you won't be able to boot from a CD until you change it back - and the time spent to do that will erase any previous time saved. ... 2- Consider what software you really want to start with Windows and also how you've configured your applications at startup ... Installing and Registering Visual Studio Express Editions Smart Device ...
    (microsoft.public.windowsxp.perform_maintain)