none
Is there a way i can know the ISP for IP address inside my .net console application RRS feed

  • Question

  • I am working on a .net console application. And inside the console application i am reading a list of IP addresses, and for each IP address i want to get its ISP programmatically? So is this possible ?

    Currently i can get the ISP manually by going to a site such as <cite>https://www.whoismyisp.org/ .. </cite><cite>but not sure if i can do this programmatically inside my console application? i tried to search for available .net libraries but i could not find any...</cite>


    • Edited by johnjohn11 Friday, November 24, 2017 4:42 PM
    Friday, November 24, 2017 4:41 PM

All replies

  • You can use some APIs which give the result in JSON format, easy to parse.

    For example : http://ip-api.com/json/xxx.xxx.xxx.xxx

    Friday, November 24, 2017 4:59 PM
  • You can use some APIs which give the result in JSON format, easy to parse.

    For example : http://ip-api.com/json/xxx.xxx.xxx.xxx


    thanks for the reply. i was trying to find a way to do this depending on my own code, rather than depending on external system,,,, so there is not a .net library or CodePlex project to implement my requirement?
    Monday, November 27, 2017 11:42 AM
  • You may perform reverse DNS lookup to query the IP in ".inaddr-arpa." format. (Say, 1.2.3.4 will be 4.3.2.1.in-addr.arpa.") for SOA record. The responsible mail address should contain the email for company that owns that IP / IP range.

    (I've never encountered networking company that don't have their own domain for email address)


    Tuesday, November 28, 2017 1:41 AM
    Answerer
  • Hi johnjohn123,

    >>thanks for the reply. i was trying to find a way to do this depending on my own code, rather than depending on external system,,,, so there is not a .net library or CodePlex project to implement my requirement?

    As far as i know, .Net framework does not provide a method to get related ISP directly, only when you create a Database which save related IP and its ISP, then you could retrieve related ISP via IP.

    As a workaround, I would suggest that you could use the web client libraries to fetch https://www.whoismyisp.org/

    For more information, please refer to:

    https://stackoverflow.com/questions/3253701/get-public-external-ip-address

    Best regards,

    Zhanglong Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 29, 2017 8:32 AM
    Moderator