I have an application that is exclusively for the people within our network. What I need to do is to get the Username, IP, and hostname of the people who visit the site. With this:
string userName = Environment.UserDomainName;
string hostName = Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(hostName);
IPAddress[] addr = ipEntry.AddressList;
string ip = addr[1].ToString();
I was able to get the user information but NOT of the visitor of the site. What im getting is IIS APPPOOL
as the username and other data is related to IIS or the server where my application is hosted. I dont want any login within the site. I just need it seamlessly.
What are the actions I need to put this altogether ?