T
Tony Johansson
Hello!
If I run the code below I get the following result
Name:
IsAuthenticated: False
AuthenticationType:
So I thought I would get the name I used when logging in to the computer and
that IsAuthenticated should be true because
the computer should Authenticate me when I logging into the computer.
Thread t = Thread.CurrentThread;
System.Security.Principal.IPrincipal threadPrincipal =
Thread.CurrentPrincipal;
Console.WriteLine("Name: {0}\nIsAuthenticated: {1}" +
"\nAuthenticationType: {2}",
threadPrincipal.Identity.Name,
threadPrincipal.Identity.IsAuthenticated,
threadPrincipal.Identity.AuthenticationType);
//Tony
If I run the code below I get the following result
Name:
IsAuthenticated: False
AuthenticationType:
So I thought I would get the name I used when logging in to the computer and
that IsAuthenticated should be true because
the computer should Authenticate me when I logging into the computer.
Thread t = Thread.CurrentThread;
System.Security.Principal.IPrincipal threadPrincipal =
Thread.CurrentPrincipal;
Console.WriteLine("Name: {0}\nIsAuthenticated: {1}" +
"\nAuthenticationType: {2}",
threadPrincipal.Identity.Name,
threadPrincipal.Identity.IsAuthenticated,
threadPrincipal.Identity.AuthenticationType);
//Tony