首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当C#项目目标指向窗口7中的.Net Framework4.8时Http请求错误

当C#项目目标指向窗口7中的.Net Framework4.8时Http请求错误
EN

Stack Overflow用户
提问于 2021-06-10 06:16:54
回答 1查看 441关注 0票数 0

以前我的C#项目目标.Net框架4.6.1,在窗口7、8.1和10中工作良好。但是现在我将目标框架更改为.Net Framework4.8、window 8.1和10,但在HTTP中没有问题,但是fine 7错误。

代码语言:javascript
复制
"An error occurred while making the HTTP request to https://Test.123.com/API/ServiceRouter.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."

备注

Http请求操作刚刚从我的服务platform.

  • Nothing

  • .Net Framework4.8中接收到一些数据,这些数据已经安装在window 7 (SP 1)中,改为在

上编码

EN

回答 1

Stack Overflow用户

发布于 2021-09-26 03:06:49

大洲春。这段代码解决了我的问题:

代码语言:javascript
复制
"System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;"

谢谢。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67915720

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档