Detecting User's IP Address

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.


Tags: , , , , , ,
Categories: ASP.NET

1876 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Comments

October 31. 2009 06:32

fast cash loans

Just try to smile for about 2-3 mins then you can get back to work

fast cash loans

November 2. 2009 02:07

Talib Ali Khan

Sure.......But  Whoz  this ?

Talib Ali Khan

November 15. 2009 03:16

payday loans

I guess there's always an easier way ...

payday loans

December 11. 2009 07:46

payday loans

Interesting post

payday loans

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



 


© Copyright 2009. www.onlineasp.net All Rights Reserved.