I have a webform, and I am trying to make a log of who is using it. All the research I did, was all about using on a local box, not through IIS.
using System.Security.Principal;
private void Form1_Load(object sender, EventArgs e)
{
string curuser = WindowsIdentity.GetCurrent().Name;
}
Where I get the Output:
tw.WriteLine(DateTime.Now + ": " + CurUser);
Output displayed:
12/1/2017 4:13:18 PM: System.Web.UI.WebControls.Label
I am assuming it is something silly and dumb. Thanks guys
Note: I have 'Windows Authentication' enabled within IIS for this site.