Linked Questions
46 questions linked to/from How do I get the current username in .NET using C#?
2
votes
1
answer
854
views
How to get the username when they login and store it to database [duplicate]
I want to get the username when users login, after that, when they want do vote for a particular candidate, they click the vote button, then the users's username will be store in the database. Any ...
-3
votes
1
answer
331
views
How to get Windows start username? [duplicate]
Well, I posted this question earlier but I haven't got the correct answer before it was marked as a duplicate. I think this is a different question, all the methods that I used returns a wrong output.
...
-2
votes
1
answer
298
views
C# computer owner name [duplicate]
I have one problem..
I have image converting program so if one user converting image file then his computer name going into file name.'
Something like this I need:
John-Doe.23-07-2016.JPG
But at the ...
0
votes
1
answer
233
views
How to retrieve current NTLM username from a C# Windows Service? [duplicate]
As per title, how to retrieve current NTLM username from a C# Windows Service?
0
votes
1
answer
114
views
How can I get a pc's user name? [duplicate]
I'm trying the get the user's name [ex) admin, John, Lucy, etc.] so I can store it to a string and create a file path to save files in my application. I have absolutely no idea how to do this. I ...
206
votes
15
answers
542k
views
How do you find the current user in a Windows environment?
When running a command-line script, is it possible to get the name of the current user?
71
votes
9
answers
160k
views
How do I get the currently-logged username from a Windows service in .NET?
I have a Windows service which needs the currently logged username. I tried System.Environment.UserName, Windows identity and Windows form authentication, but all are returning "System" as ...
12
votes
6
answers
68k
views
Finding user name of current logged in user using VB.NET
I'm trying to get the user name of the current user. When I log in as Johnny Smith and run my application without administrator privileges it will return me the correct user name, Johnny Smith. But ...
14
votes
4
answers
6k
views
Can WindowsIdentity.GetCurrent() return null?
ReSharper warns me about a possible NullReferenceException in
WindowsIdentity windowsIdentity = new WindowsIdentity(WindowsIdentity.GetCurrent().Token);
I looked in MSDN doc but didn't see any ...
1
vote
2
answers
3k
views
How to show current user's name?
I want to create a textblock that says "Welcome username".
username = current Windows user.
I'm working in a WPF project.
0
votes
2
answers
20k
views
In C# How to get Windows Credentials from credential manager
Every where they are giving answers for getting user......but i want to get credentials from Credential Manager?
I have tried all the ways using .,
1.System.Security.Principal.WindowsIdentity....
1
vote
7
answers
10k
views
c# - How to get active session/user on local machine (Windows 10)
Windows 10 on start automatically log-on multiple (local) users & programs.
So I might have some 'ghost' users logged in once only 1 user is 'active' at this time
I need to recognize in my app if ...
1
vote
1
answer
4k
views
How to get logged in PC username in Windows Store Apps?
like in this thread How do I get the current username in .NET using C#?
but the code
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
doesn't seem to work on Windows 8 ...
0
votes
1
answer
4k
views
Read System.Net.CredentialCache.DefaultNetworkCredentials.UserName
I'm trying to get the userName of the connected user in my application but the System.Net.CredentialCache.DefaultNetworkCredentials.UserName is always empty.
Someone can suggest me how i can do to ...
3
votes
2
answers
1k
views
How does it happen Azure web role entry point and .aspx page handler are run in different processes?
I'm playing with this Azure web role sample. It contains a class derived from RoleEntryPoint and a .aspx page that contains a button click handler.
I test it in Azure Emulator. I put the following ...