Web Service 初级教程
时间:2011-03-10 来源:沉默的糕点
访问Https的Web services
加入下面代码,什么证书都接受。
static WebServices() { ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult); } private static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors) { return true; }
Http 用户密码验证
导入Wsdl文件之后,加入
var webServiceClient = new WebReference.AManager();
a.Credentials = new NetworkCredential(userName, password);
相关阅读 更多 +