WindowsIdentity.IsGuest : WindowsIdentity « System.Security.Principal « C# / C Sharp by API






WindowsIdentity.IsGuest

 

using System;
using System.Security.Principal;


class MainClass
{
  public static void Main() 
  {
    WindowsIdentity wi = WindowsIdentity.GetCurrent();

    Console.WriteLine("Identity information:");
    Console.WriteLine("  Authentication Type: {0}",wi.AuthenticationType);
    Console.WriteLine("  Is Anonymous: {0}", wi.IsAnonymous);
    Console.WriteLine("  Is Authenticated: {0}", wi.IsAuthenticated);
    Console.WriteLine("  Is Guest: {0}", wi.IsGuest);
    Console.WriteLine("  Is System: {0}", wi.IsSystem);
    Console.WriteLine("  Name: {0}", wi.Name);
    Console.WriteLine("  Token: {0}", wi.Token);
  }
}

   
  








Related examples in the same category

1.WindowsIdentity.AuthenticationType
2.WindowsIdentity.GetCurrent()
3.WindowsIdentity.Impersonate()
4.WindowsIdentity.IsAnonymous
5.WindowsIdentity.IsAuthenticated
6.WindowsIdentity.IsSystem
7.WindowsIdentity.Name
8.WindowsIdentity.Token