System.Net.WebException: 使用 HttpWebRequest 时无法连接到远程服务器错误 post?

System.Net.WebException: Unable to connect to the remote server error while just making post with HttpWebRequest?

我有 HttpWebRequest 并且它给出了这个 error.I 不能尝试 this 回答因为我不能使用本地 ip.There 是一个奇怪的问题,在我的电脑中没有这样的错误但是在服务器中,它提供了这个 error.The 数据库,不在服务器中,我们使用 api 作为 crud operations.By 项目的方式是 windows 服务。它给出了这个错误,然后服务是 stopping.there 是另一个 detail.The 服务器,我在其中安装了 windows 服务(它不是具有数据库的服务器。)有 %100 cpu usage and almost %100 ram usage.I set the timetout of request 100 seconds but it is not solve the problem.The 详细答案如下

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond....

我该如何解决这个问题?和想法?顺便说一下,大约 50 秒的程序尝试 post 请求,然后给出 error.Also 还有另一个细节,数据库所有者 api 有获取列出一些数据的方法,我可以从浏览器打开它们与我在 post

中使用的相同 link

问题与 httpwebrequest 的代理设置有关。设置代理解决了这个问题。