简体   繁体   English

从无法ping通的网站获取响应(C# ASP .net mvc)

[英]Get response back from unpingable websites (C# ASP .net mvc)

I'm not a network expert, but for one of my projects, I need to ensure that the website I'm sending the request to is alive.我不是网络专家,但对于我的一个项目,我需要确保我发送请求的网站是活动的。 Some websites do not respond to ping;一些网站不响应 ping; basically, their configuration prevents response to ping requests.基本上,它们的配置阻止了对 ping 请求的响应。
I was trying to Arping instead of pinging websites, but Arping only works on the local network and will not go beyond the network segment ( this ).我试图Arping而不是 ping 网站,但 Arping 仅适用于本地网络,不会超出网段( this )。 I can download the whole or part of the webpage and confirm if the content is the same as the previous state, but I rather have one more level of confirmation before downloading Html.我可以下载整个网页或部分网页,并确认内容是否与之前的状态相同,但我宁愿在下载 Html 之前再进行一次确认。

Is there any other method that enables the app to get a response back from non-pingable websites outside the network?是否有任何其他方法可以使应用程序从网络外部的不可 ping 的网站获得响应?

Based on common practices you may use ping, telnet and tracert as a client to the requested server (at this point the website or the service you want to connect) and make sure the 3 command are enable to your side.根据常见做法,您可以使用 ping、telnet 和 tracert 作为请求服务器的客户端(此时是您要连接的网站或服务),并确保您已启用 3 命令。 You may also try to access it to your browser.您也可以尝试通过浏览器访问它。

If its API you may also try to use POSTMAN and call the service.如果它的 API 您也可以尝试使用 POSTMAN 并调用该服务。

Goodluck and happy coding :)祝你好运,编码愉快 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM