Difference - Ways to get current logged in user
Hi all...
My question is -
What is the difference between -
1. Page.User.Identity.Name
2. HttpContext.Current.User.Identity.Name.ToString();
3. System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
4.System.Environment.UserName;
-----------
Which is the best method to get the current logged in username for all Single Sign On Applications ??
------------
Which statement is to be used in which scenario ??
-------
Please explain.