Posts Tagged ‘Console Application’
My.User.Name returns an empty string
I’m not sure when or why this happened. It MAY be related to this application being a console application.
The alternative is:
Console.WriteLine(“Windows ID:” & System.Security.Principal.WindowsIdentity.GetCurrent.Name)
from a post here:
http://bytes.com/topic/visual-basic-net/answers/585547-my-user-name-returning-empty-xp-pro-sp2