I need to get the windows logged on user name in the Sitecore 9.2 application.
I have enabled windows authentication in IIS ,
and tried with the
HttpContext.Current.User.Identity.Name its always giving me "extranet\anonymous"
And tried with System.Security.Principal.WindowsIdentity.GetCurrent().Name and HttpContext.Current.Request.LogonUserIdentity.Name but no luck.
Need help here to get the windows logged on user name