If your website contains sensitive data and you don't want any spamming or any malicious use of your website ,then one thing you can do is to keep a track of the visiting user's system IP and this can be done in some easy steps given below,
string strHostName = System.Net.Dns.GetHostName();
string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
Now set the value of clientIPAddress to either a Textbox or label or any control as per your requirement.
6f4cce80-5e41-420f-93e9-cd1425067d06|2|4.5
Tags:
asp,
asp.net,
.net,
ip,
detecting,
address,
user
Categories:
ASP.NET
Posted by Talib on July 9, 2009 23:26
Actions:
E-mail |
Permalink |
Comment RSS