I have a web program In asp.net and c#. In my application I want get the current windows username and save it on a variable.If I run my app in local I can do it easily but when I run my app from server How can I do it? It means How can I get current user from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows \CurrentVersion\ Authentication /LogonUI and save it on a variable?