Hi
I have an intranet site behind a highly secure firewall. I need to get the user at the client that is logged in
I am using this in c# in a web forms application
using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;
using System.Security.Principal;
...
....
....
String UserName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
It gives me the account of the server. I need to get the username of the person logged in at the client.
How can I do this? Any way to make it pass through from to IIS? Maybe turn anonymous access off?
Thank You
Our community of experts have been thoroughly vetted for their expertise and industry experience.