Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7043721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:19:27+00:00 2026-05-28T02:19:27+00:00

In C#: If I ping a url (eg. http://myurl.com) and that url doesn’t exist

  • 0

In C#:

If I ping a url (eg. “http://myurl.com”) and that url doesn’t exist I get a SocketException (No such host is know). This request is a very fast way to determine if a address exist. Is there any similar way to check if an IP “exists”?

Obviously there is the possibility to ping the IP, but if the host is located in china (and I’m located in Sweden) then the ping time gets very long…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:19:28+00:00Added an answer on May 28, 2026 at 2:19 am

    No, there is no foolproof way to check if an IP is used since the use is not registered anywhere.

    The reason the hostname check is fast is that you don’t need to actually talk to the host to figure out whether the hostname exists, it’s registered in the DNS system.

    The hostname check you’re doing in no way guarantees that the host actually exists, just that an alias from the hostname to an IP number exists, the host may well be down and you won’t know from that lookup.

    Also, even if you use ping to try to figure out if an IP is used, you’re not sure since there may be a firewall blocking ping and still letting other IP traffic through (HTTP for example). To best know if a host available to serve your requests, you’re best off polling it using the actual protocol you’re interested in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is related to my previous question: Android Service - Ping URL So
I know I can fetch url from AppEngine. But I just want to ping
I am attempting to print a JSON that I get like this: jsonfields =
I have one issue that i want to ping URL from code behind (EXE
I need a monitor class that regularly checks whether a given HTTP URL is
When I play ping-pong with the Google OpenID provider, I can't get a friendly
Is it always possible to ping localhost and it resolves to 127.0.0.1? I know
im trying to ping a list of domains to get initial indications if they
Having some issues running my code local. I have host file setup like this:
I'm using WCF to implement a web service. This web service requires a 'ping'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.