当我在本地运行我的应用程序或在浏览器中输入(原始)URL时,它可以正常工作。当我将其发布到我的域时,它不会:
string responseString;
using (var client = new WebClient())
{
responseString = client.DownloadString("https://cp.customerlog.in:5656/api/client/command.php?key=123456&hash=123456&action=info&bw=true");
}
错误讯息:
unable to connect to the remote server
我添加了以下行(在开头),这产生了另一个错误:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; // all other (except Ssl3) ProtocolTypes produced the same error as above (unable to...)
错误讯息:
The underlying connection was closed: An unexpected error occurred on a receive.