in

How to get current Domain logged in user of local system in mvc


I have an application for an organization where a user will logged in to his system with Domain user , so now i want to get that logged in user , i applied too many methods and get username local but my application is on IIS and it gets the iis user with IIS APPPoolDefaultAppPool while system name and domain get but username not.
following i am using for getting username:
Request.ServerVariables.Get("logon_user");
System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Environment.GetEnvironmentVariable("USERNAME");
System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).Identity.Name;



Source: https://stackoverflow.com/questions/70539888/how-to-get-current-domain-logged-in-user-of-local-system-in-mvc

Using GNOME Screenshot Tool in Linux Like a Pro

Binding generator for FFI bindings