Pete's Windows, Office, VB & SQL Blog

Problems I have solved (or not) and good ideas I've found

Posts Tagged ‘Console Application

My.User.Name returns an empty string

leave a comment »

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

Written by fisherpeter

2009 August 14 at 14:07

Follow

Get every new post delivered to your Inbox.