Friday, May 21, 2010

How to get the IP address of the user visiting to my asp.net website???

i made a project in college using asp.net,vb.net,sql server 2000..It is made on visual studio.net 2003...


now i want to get the user's ip address who r currently visiting my website over my lan...


how to do this???


Is thr any flash file which automatically does this??


or i need to do some special coding???


pls help me to do this...


thank u

How to get the IP address of the user visiting to my asp.net website???
You can use the ServerVariables collection property of the Request object:





string IPAddress = "";





IPAddress = Request.ServerVariables[ "REMOTE_ADDR" ].ToString();





Response.Write( String.Format("Your IP Address Is: {0}", IPAddress) );





Or in VB.NET:





Dim IPAddress as String





IPAddress = Request.ServerVariables( "REMOTE_ADDR" )





Response.Write( String.Format("Your IP Address Is: {0}", IPAddress) )
Reply:you can try to find out here


http://codingforum.info/
Reply:I use this...





http://statcounter.com/

wild flowers

No comments:

Post a Comment