title: How to get the current logged on user, including domain in Delphi 2009?
body: <p>I need to get the current logged on username? I need this to work properly when I call the code from ASP.NET which is working in Windows Authentication mode. i.e. I do not want to get the ASPNET user in that circumstance, but the impersonated user. This is related to my earlier <a href="https://stackoverflow.com/questions/1797814/windows-authentication-in-a-com-object-called-from-asp-net">question</a>. Everything I try returns <strong>ASPNET</strong>.</p>