webApi Authentication failed because the remote party has closed the transport stream\身份验证失败了,因为远程方关闭了传输流。
public class CertificateTrust
{
public static void SetCertificatePolicy()
{
//当在浏览器中可以正常访问,而code中出现错误时,可以用fiddle看下正常访问的SSl加密认证的版本号
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
ServicePointManager.ServerCertificateValidationCallback =
new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);
}
public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{
return true;
}
} 连接client之前调用
CertificateTrust.SetCertificatePolicy();
webApi Authentication failed because the remote party has closed the transport stream\身份验证失败了,因为远程方关闭了传输流。的更多相关文章
- Mysql 连接提示 Client does not support authentication protocol requested by server 客户端不支持服务器请求的身份验证协议;考虑升级MySQL客户端
		由于查阅了很多百度文档发现很多方法比较复杂,所以写个备忘: 首先,进入MySQL 8.0Command Line Client -Unicode,输入密码,登录进去. 然后,在命令行输入:ALTER ... 
- fatal: Authentication failed for “someurl”
		一.前言 我们在公司做项目,很多时候会遇到这个问题:Git failed with a fatal error. Authentication failed for ‘ http// xxx..... ... 
- remote: Incorrect username or password ( access token ) fatal: Authentication failed for
		gitee推送到远程仓库时提示错误remote: Incorrect username or password ( access token )fatal: Authentication failed ... 
- remote: http basic: access denied fatal: authentication failed for '‘解决办法
		问题描述 由于这个项目代码使用https 进行clone,为什么?因为代码库ssh有问题!fuck! 导致在push代码的时候出现了 remote: http basic: access denied ... 
- Username for 'https://github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/GLSmile/pythontest.git/' 问题
		使用$ git push -u origin master 进行同步时,提示输入用户名和密码,但是我输入正确的信息后,仍然 会报Username for 'https://github.com': r ... 
- github提交失败并报错java.io.IOException: Authentication failed:
		一.概述 我最近在写一个android的项目. 软件:android studio.Android studio VCS integration(插件) Android studio VCS inte ... 
- fatal: Authentication failed for又不弹出用户名和密码 解决办法
		各位,如果能弹出来,一定是你账号密码搞错了,就别继续看了. image.png 切换命令行: image.png 依然报错, 说到这个问题,又可以长篇大论了, 我使用的是tortoisegit ... 
- Git在提交代码时出现的fatal: Authentication failed的问题
		git push origin master remote: Incorrect username or password ( access token ) fatal: Authentication ... 
- windows 切换git远程仓库地址后 git push 提示Authentication failed
		git切换远程分支: 方法一: git remote set-url origin 你新的远程仓库地址 方法二: git remote rm origin git remote add origin ... 
随机推荐
- <十三>UML核心视图静态视图之业务用例图
			一:uml的核心视图 --->如果说UML是一门语言,上一章学习的参与者等元素是uml的基本词汇,那么视图就是语法.uml通过视图将基元素组织在一起,形成有意义的句子. --->uml可视 ... 
- 「LuoguP1402」 酒店之王(最大流
			题目描述 XX酒店的老板想成为酒店之王,本着这种希望,第一步要将酒店变得人性化.由于很多来住店的旅客有自己喜好的房间色调.阳光等,也有自己所爱的菜,但是该酒店只有p间房间,一天只有固定的q道不同的菜. ... 
- JVM介绍(一)
			JVM是运行在操作系统之上的,它与硬件没有直接的交互 类装载器ClassLoader 负责加载class文件,class文件在文件开头有特定的文件标示,并且ClassLoader只负责class文件的 ... 
- C++类对象之间的类型转换和重载
			类对象和其他类型对象的转换 转换场合有: 赋值转换 表达式中的转换 显式转换 函数调用, 传递参数时的转换 转换方向有: 由定义类向其他类型的转换 由其他类型向定义类的转换 #include < ... 
- UVA562(01背包均分问题)
			Dividing coins Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Descriptio ... 
- spark运行模式之二:Spark的Standalone模式安装部署
			Spark运行模式 Spark 有很多种模式,最简单就是单机本地模式,还有单机伪分布式模式,复杂的则运行在集群中,目前能很好的运行在 Yarn和 Mesos 中,当然 Spark 还有自带的 Stan ... 
- win8安装iis
			win8下面安装iis跟win7一样,需要通过启用和关闭windouws功能来安装iis,具体要选哪些项,请看图: 如果要使用wcf服务,你还需要勾选以下项: 
- 微信小程序开发之页面数据绑定
			js:Page( { data:{ parmer:"", //字符串参数 userinfo:{ userphone:"", ... 
- Linux locate 文件搜索
			在学习 兄弟连 linux教学视频 的时候,我将所学的 linux 命令记录在我的博客中,方便自己查阅. 文件处理命令:locate 基础的命令 命令名称:locate 命令的所在路径:/usr/bi ... 
- MFC中CArray类原理及其应用
			1.CArray类应用 函数简介CArray::GetSize int GetSize( ) const;取得当前数组元素个数. CArray::GetUpperBound int GetUpperB ... 
