解决方法

webRequest.KeepAlive = false;
ServicePointManager.ServerCertificateValidationCallback += (s, cert, chain, sslPolicyErrors) => true;

//WebRequest请求被中止: 未能创建 SSL/TLS 安全通道  在请求之前插入TLS安全协议:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

The underlying connection was closed: An unexpected error occurred on a receive的更多相关文章

  1. 微信接口问题(The underlying connection was closed: An unexpected error occurred on a send)

    突然在调用微信接口是报:The underlying connection was closed: An unexpected error occurred on a send错误,跟踪了半天,是因为 ...

  2. The underlying connection was closed: An unexpected error occurred on a send

    操作系统是Windows Server 2003 x64 SP2,使用Framework 4.0,在使用WebClient访问某些特定的HTTPS站点时,会引发异常: Unhandled Except ...

  3. Json Post到 https的坑 - the underlying connection was closed an unexpected error occurred on a send(远程服务器未知错误导致关闭)

    最近做了一个安装包,安装包会弹出dotnet的 窗体,这个安装包会去调用https的一个api.用测试程序测试窗体都是好的.一旦打入安装包后,就报错.研究了半天,原来是https惹的祸 解决方案: . ...

  4. The underlying connection was closed: An unexpected error occurred on a rece

    服务器问题,在后台访问外网了,特别是https的网站,容易出这个问题. 修改服务器配置,或修改代码解决.

  5. Web Server 使用WebClient 发送https请求 The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

    使用WebClient 发送https请求 使用WebClient发送请求时,并且是以https协议: WebClient webClient = new WebClient(); string re ...

  6. EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

    EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secu ...

  7. [WebException: The underlying connection was closed: The message length limit was exceeded.]解决方法

    [WebException: The underlying connection was closed: The message length limit was exceeded.]   Syste ...

  8. [bug]The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

    写在前面 在模拟请求的时候,如果url为https的,会报这个错误.大概错误就是:基础连接已关闭:无法建立信任关系的SSL / TLS的安全通道. The underlying connection ...

  9. windows xp .net framework 4.0 HttpWebRequest 报The underlying connection was closed,基础连接已关闭

    windows xp .net framework 4.0 HttpWebRequest 报The underlying connection was closed,基础连接已关闭,错误的解决方法 在 ...

随机推荐

  1. Linux(Centos7.6)下安装Gitlab详细教程

    Gitlab搭建操作步骤: 1.查看Linux系统版本确认gitlab需要使用的安装包类型 使用命令:cat /etc/redhat-release CentOS Linux release 7.6. ...

  2. Jupyter Notebook---不需认证,与nginx搭配远程访问及下载

    如果默认启动,jupyter notebook需要token或是password登陆,且在nginx后面,下载会报403限制. Blocking Cross Origin request from h ...

  3. django 补充 QuerySet数据类型

    1 QuerySet数据类型  特点:      (1) 可切片    Entry.objects.all()[:5]      (2) 可迭代 :                articleLis ...

  4. CEF3相关知识汇总(不断更新)

    CEF全称是Chromium Embedded Framework,它是Chromium的Content API的封装库. CEF官网地址:https://bitbucket.org/chromium ...

  5. 小学四则运算口算练习app---No.3

    今天主要是实现按照指定的题目出题数目出题.在昨天设置页面的基础上,今天首先要学习的是接收不同页面间的参数问题.详解如下: 然后就开始我的传参和接收参数的问题! 在当前的Activity上进行跳转, 代 ...

  6. hdu6222——佩尔方程&&大数__int128

    题意 给定一个整数 $N$($1 \leq N \leq 10^{30}$),求最小的整数 $t$,要求 $t \geq N$,使得边长为 $t-1, t, t+1$ 的三角形面积为整数. 分析 根据 ...

  7. POJ2536-Gopher II-(匈牙利算法)

    题意:n只老鼠,m个洞,s秒逃命,逃命速度为v,一个洞只能保住一只老鼠,最少多少只老鼠会被老鹰抓到. 题解:找出每只老鼠有哪些洞可以保命,建立二分图,算出最大匹配,不是求保住命的老鼠,而是求被抓住的老 ...

  8. ArrayList与String[]

    不逼自己一把,你永远不知道什么是绝望. 今天被初学java的朋友问到了String[]跟ArrayList是不是有关系呢? 猜测是名称之间的联想,记此篇解惑. Array英语单词里是数组.阵列的意思, ...

  9. 可怕的Full GC (转自Hbase不睡觉书)

    PS:之前做项目的时候,需要做个复杂的查询,大量的查询总是导致hbase集群奔溃,最后定位到时full GC的原因. 以下转自<Hbase不睡觉书>-------------------- ...

  10. 八大排序算法总结与java实现(转)

    八大排序算法总结与Java实现 原文链接: 八大排序算法总结与java实现 - iTimeTraveler 概述 直接插入排序 希尔排序 简单选择排序 堆排序 冒泡排序 快速排序 归并排序 基数排序 ...