Last post Sep 15, 2018 09:34 PM by Haashim
Sep 15, 2018 11:46 AM|Haashim|LINK
Anyone tell me How to get System IP Address or System Name of Client who is using My Website
My code is Working but its on Local System.
it Always get the Server Name and IPAddress. But i want Client Information who is accessing my Website ....!!!!
................. Thats my code .......................
IPHostEntry ip = Dns.GetHostEntry(Dns.GetHostName());
IPAddress IPaddr = ip.AddressList;
string IPAddress = IPaddr.ToString();
Sep 15, 2018 01:28 PM|PatriceSc|LINK
Your code is for the "local" computer and even though it can appear to work when you are running the server side on your dev machine, it still runs on the web server and is expected to return the web server IP address.
See rather https://stackoverflow.com/questions/527638/getting-the-client-ip-address-remote-addr-http-x-forwarded-for-what-else-coul (it
is still the public IP address ie multiple computers could be exposed to internet using a single IP address). Always be cautious with what you'll do with this address.
Sep 15, 2018 01:42 PM|Haashim|LINK
hmmm !! Can i get the Physical Address of Client System ???
Article you shared is about IP Address, and its not a good method bcz ip changes ?? Anything related to Physical Address ??
Sep 15, 2018 02:58 PM|PatriceSc|LINK
No, AFAIK the MAC address is not even transmitted outside of the network. For privacy reason you have nothing out of the box to uniquely identify a machine.
https://stackoverflow.com/questions/216542/how-do-i-uniquely-identify-computers-visiting-my-web-site that discuss limitations and possible options to get close (but you'll never have a 100% full proof solution). Do you even really need this kind of information?
Edit: for example even Google Analytics doesn't get it right: http://www.analytics-ninja.com/blog/2011/12/how-unique-are-unique-visitors-in-google-analytics.html but
for this kind of solution what matters should be the trend rather than really which exact value you have on a particular day.
Sep 15, 2018 04:56 PM|Haashim|LINK
Well i really need that !! Bcz my Website contains Confidential Data. I am trying to Secure my website with every possible option i have.
Basically what i am trying to achieve that whenever user login it should read his/her Physical address.
with this Approach i can assure myself that there is nothing to worry about my data miss use.
Well Thanks for the information
Sep 15, 2018 07:00 PM|PatriceSc|LINK
Assuming you could what would you do anyway if a user wants to use another browser or gets a new computer ? Tying each user to a physical machine seems a bit unrealistic in the real world.
Instead you could enhance your authentication system using a 2nd authentication factor for example or sending a temporary password etc... You can also track the IP, check the location and warn the user about unusual activities (for example most account providers
will warn you if suddenly you seems to log from another region).
Sep 15, 2018 07:12 PM|Haashim|LINK
well i have a solution if user changed his system . in that case i will provide a one time password.
when user enter that password it will update the new status of that computer. well i have so many options but first i want physical address or any information related to system that not changes else he changes his computer or buy a new one ?????
problem with IP is that it changes automatically except someone set in Manually but its not a good solution for me to use IP, i want a thing that not changes so that i can trace easily !!!
Sep 15, 2018 09:14 PM|PatriceSc|LINK
Once again you can't have the MAC address. As discussed at
https://stackoverflow.com/questions/216542/how-do-i-uniquely-identify-computers-visiting-my-web-site at best you could attempt to uniquely recognize a browser with increasingly levels of difficulty.
My approach would be to generate a guid stored in various places at as shown at
https://samy.pl/evercookie/ (which comes from the above link). It would allow to give the user a "trust/untrust" my browser feature. Note that a user should likely be able to "untrust" any browser (for example if a
machine is stolen). If the user can manually remove all those values he is back to the default account protection and just have to trust the browser again if he wants to.
Sep 15, 2018 09:34 PM|Haashim|LINK
Yeah i know that i can't have Mac Address , I was just dreaming :P hahah thanks Dude for the lots of Info !!