Created
July 31, 2012 07:16
-
-
Save wsky/3214456 to your computer and use it in GitHub Desktop.
servicePointManager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//解决部分服务器证书问题 | |
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(delegate { return true; }); | |
//以下可选,强制协议 | |
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; | |
ServicePointManager.Expect100Continue = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.net> | |
<settings> | |
<servicePointManager checkCertificateRevocationList="true"/> | |
</settings> | |
</system.net> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment