---
title: "Comment by C0deR4t on \"C# Tip: use the Ping class instead of an HttpClient to ping an endpoint\" | Hashnode"
description: "It&#39;s important to know that many websites / environments turn off ICMP replies (replying to PING commands). If the host refuses to reply to your echo/ping r"
url: "https://hashnode.com/posts/c-tip-use-the-ping-class-instead-of-an-httpclient-to-ping-an-endpoint/62dfdef5790e138f3d39964f/comment/62e1b1f2d15a9fb24e514c6a"
---

[Discussion](https://hashnode.com/posts/c-tip-use-the-ping-class-instead-of-an-httpclient-to-ping-an-endpoint/62dfdef5790e138f3d39964f)

Comment [C# Tip: use the Ping class instead of an HttpClient to ping an endpoint](https://hashnode.com/posts/c-tip-use-the-ping-class-instead-of-an-httpclient-to-ping-an-endpoint/62dfdef5790e138f3d39964f)

[C0deR4t](https://hashnode.com/@C0deR4t)

[Jul 27, 2022](https://hashnode.com/posts/c-tip-use-the-ping-class-instead-of-an-httpclient-to-ping-an-endpoint/62dfdef5790e138f3d39964f/comment/62e1b1f2d15a9fb24e514c6a)

It's important to know that many websites / environments turn off ICMP replies (replying to PING commands). If the host refuses to reply to your echo/ping request it might seem like the host is down when in actual fact it is up but does not support the use of PING

Other than that, great article, enjoyable read 🐼

[Davide Bellone](https://hashnode.com/@davidebellone)

[Jul 28, 2022](https://hashnode.com/posts/c-tip-use-the-ping-class-instead-of-an-httpclient-to-ping-an-endpoint/62dfdef5790e138f3d39964f/comment/62e1b1f2d15a9fb24e514c6a#reply-62e2373ad15a9fb24e515dd0)

I've never understood why they turn off ICMP.

BTW in some environments, such as the Azure Portal, you can use the `tcpping` command ([here, in an old article](https://www.code4it.dev/blog/tcpping-azure-portal))
