Linked Questions

2 votes
1 answer
854 views

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 ...
ycwong's user avatar
  • 55
-3 votes
1 answer
331 views

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. ...
Codemunkeee's user avatar
  • 1,613
-2 votes
1 answer
298 views

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 ...
Gretel R's user avatar
0 votes
1 answer
233 views

As per title, how to retrieve current NTLM username from a C# Windows Service?
Gianluca Ghettini's user avatar
0 votes
1 answer
114 views

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 ...
Uchiha Itachi's user avatar
206 votes
15 answers
542k views

When running a command-line script, is it possible to get the name of the current user?
Geo's user avatar
  • 97.6k
71 votes
9 answers
160k views

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 ...
Raj's user avatar
  • 4,000
12 votes
6 answers
68k views

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 ...
Mario LIPCIK's user avatar
14 votes
4 answers
6k views

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 ...
Noich's user avatar
  • 15.7k
1 vote
2 answers
3k views

I want to create a textblock that says "Welcome username". username = current Windows user. I'm working in a WPF project.
user2579151's user avatar
0 votes
2 answers
20k views

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....
sai's user avatar
  • 319
1 vote
7 answers
10k views

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 ...
Maciej's user avatar
  • 10.9k
1 vote
1 answer
4k views

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 ...
Hendra Anggrian's user avatar
0 votes
1 answer
4k views

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 ...
K. BLEU's user avatar
  • 291
3 votes
2 answers
1k views

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 ...
sharptooth's user avatar
  • 171k

15 30 50 per page