I need to find the NTLoginID of the currently logged in user on a Web Site, preferably using C#. I have tried several different methods and all work fine locally, but do not on my server. Below, I have what I have tried, as well as the response I got from the server. For everything I tried locally, I either got the Domain\NTLoginID or just the NTLoginID.
Server: NETWORK SERVICE
Server: NT AUTHORITY\NETWORK SERVICE
WindowsPrincipal wpUser = (WindowsPrincipal)System.Threading.Thread.CurrentP rincipal;
How can I get at least one of these (or find another way) to give the correct domain/username or just the username?