Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear sir,
am developing website, thus am doing user registration module
now i want track the user's service provider name who are all registered.
for that i want coding for get isp name using c#
please send me that will help.

thanks

Nandakumar S
s/w developer
Posted
Updated 27-Jan-12 1:52am
v2
Comments
Herman<T>.Instance 27-Jan-12 7:59am    
what have you tried?

1 solution

You can get the IP address using Server variables
C#
string ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

or this
C#
string strHostName = System.Net.Dns.GetHostName();
string strIp = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();

For getting country name from IP read this article
How to convert IP address to country name[^]
GeoIP - Where are your internet visitors coming from?[^]
 
Share this answer
 
v2
Comments
fjdiewornncalwe 27-Jan-12 10:46am    
Just linkified your links and added pre tags.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900