To get the current logged in user at the system I use this code:
string opl = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
Using System.Web.HttpContext.Current.User.Identity.Name should work.
Please check the IIS Site settings on the server that is hosting your site by doing the following:
Go to IIS → Sites → Your Site → Authentication

Now check that Anonymous Access is Disabled & Windows Authentication is Enabled.

Now System.Web.HttpContext.Current.User.Identity.Name should return something like this:
domain\username