为什么在使用 DirectLine v3 客户端(Microsoft Bot 连接器)时连接会关闭

Why does connection get closed when using DirectLine v3 Client (Microsoft Bot Connector)

我已经设置了一个自定义服务,通过 DirectLine 将我的 Alexa Skill 与我的聊天机器人连接起来。上周四一切正常,我能够使用 Alexa(开发人员测试工具)向我的 Bot 发送消息,并且还收到了我的 Chatbot 的回复。

现在我想继续我的开发,但每次我想开始我的对话时,我都会得到这个例外:

An existing connection was forcibly closed by the remote host

简而言之,我的代码如下所示:

var client = new DirectLineClient(_directLineSecret);
var conversation = await client.Conversations.StartConversationAsync().ConfigureAwait(false);
var conversationId = conversation.Result.ConversationId;

直线密码应该是正确的,因为它在我的网络聊天实现中运行良好。

12 月 14 日有更新。您需要将 SecurityProtocol 设置为 TLS1.2

"On December 4th, 2018, the Azure Bot Service will require all connections to be secured using Transport Layer Security (TLS) 1.2. This enforcement is critical to providing the best possible security for your data. "