基本的连接返回流程,需要根据自己的程序做调整,测试可用
//如果是SSL安全访问,而且没有密钥的时候
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
string url = "ttp://postServerUrl";
//需要post的内容
string postString = "xxx";
//创建web连接,发送(post)
WebRequest request = HttpWebRequest.Create(url);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
byte[] aryBuf = Encoding