【问题标题】:connection issue to azure cognitive search from asp.net mvc website从 asp.net mvc 网站到 azure 认知搜索的连接问题
【发布时间】:2020-04-14 07:19:20
【问题描述】:

我有一个用 .NET 框架 4.7 开发的 asp.net mvc 网站。从托管网站获取连接问题。你能帮忙吗

An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

【问题讨论】:

  • 我们着手为 Kubernetes 带来事件驱动架构的优势和功能的生产力。结果是 KEDA——基于 Kubernetes 的事件驱动自动缩放。
  • @Sajeetharan...你的评论有什么相关性?

标签: azure azure-cognitive-search


【解决方案1】:

我通常在调试时遇到这个错误,但如果你部署它,它就会消失。
出于调试目的,请在调用外部服务之前添加以下行。
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

【讨论】:

  • 嗨 Manish,我在部署后遇到了这个问题..它在调试模式下工作正常..感谢您的回复
  • 托管在哪里?可能是一些 TLS 问题。
  • 是的..托管在第三方主机提供商上
  • 在 azure app 服务(测试环境)上托管网站后出现同样的错误
  • 您尝试过 ServicePointManager.SecurityProtocol 选项吗?添加这些行并部署。在这里找到类似的东西stackoverflow.com/questions/22627977/…
猜你喜欢
  • 2023-01-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-03-27
  • 1970-01-01
  • 1970-01-01
  • 2010-10-20
  • 2023-03-12
相关资源
最近更新 更多