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 ...
随机推荐
- ios系统的特点
iOS优势 1). 比较稳定,因为他是一个完全封闭的系统,不开源,但是这个系统有他自己严格管理体系,比如app store的app应用:他有自己的评审规则,另外很多软件是需要收费的,这在一定程度上也说 ...
- 树堆(Treap)
平衡树 简介: 平衡二叉树(Balanced Binary Tree)具有以下性质:它是一 棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左右两个子树都是一棵平衡二叉树.平衡二叉树的常用实现方 ...
- oracle下 启动subversion命令 及 oracle相关服务启动备忘
linux shell下 svnserve - d -r + 目录 例如:svnserve -d -r /svn 启动 svn服务. 访问svn://192.168.0.120/kjcg 测试. ...
- Java笔记(五)
泛型:JDK1.5版本后出现的新特性.用于解决安全问题,是一个类型安全机制. 好处:将运行期间出现问题ClassCastException,转移到了编译时期.方便程序员解决问题,让运行时问题减少. 避 ...
- AutoIt with XML: Add a child/grandchild node or remove any node
Sometimes, we have to use AutoIt script to edit an xml, add a node or remove a node, to make some de ...
- 【转】Cache Buffer Chain 第三篇
文章转自:http://oracle.chinaitlab.com/induction/862509.html,文章前部分转载,后部分自己加上的. Oracle数据库只读模式的CACHE BUFFER ...
- HDOJ-1263
水果 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submissi ...
- 4.1-4.2 基于HDFS云盘存储系统分析及hadoop发行版本
一.基于HDFS云盘存储系统 如:某度网盘 优点: *普通的商用机器 内存 磁盘 *数据的安全性 操作: *put get *rm mv *java api *filesystem 核心: *H ...
- linux中消息队列<一>
1 概念 (1)链表式结构组织,存放于内核. (2)通过队列标识来引用. (3)通过一个消息类型来索引指定的数据 2 创建消息队列 #include <sys/msg.h> int msg ...
- 3-1Java程序的执行流程
3-1Java程序的执行流程 用记事本写一个简单的程序 存到:E:\java路径下 class HelloImooc{ public static void main(String[] agrg ...