使用DirectLine v3客户端(Microsoft Bot连接器)时,为什么连接会关闭 [英] Why does connection get closed when using DirectLine v3 Client (Microsoft Bot Connector)

查看:113
本文介绍了使用DirectLine v3客户端(Microsoft Bot连接器)时,为什么连接会关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have setup a custom service to connect my Alexa Skill with my Chatbot via DirectLine. Last thursday everything worked fine and I was able to send messages to my Bot by using Alexa (Developer Test tool) and also received responses from my Chatbot.

现在我想继续我的开发,但是每次我想开始对话时,都会遇到以下异常:

Now I wanted to continue my development but everytime i want to start my conversation I get this exception:


远程主机强行关闭了现有连接

An existing connection was forcibly closed by the remote host

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

In short my code looks like this:

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

由于我在网络聊天实现中可以正常使用,因此直接机密应该是正确的。

The directline secret should be correct as it is working fine within my webchat implementation.

推荐答案

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

There's an update on dec 14. You need to set your SecurityProtocol to TLS1.2

在2018年12月4日,Azure Bot服务将要求使用传输层安全性(TLS)1.2保护所有连接。此强制实施对于为数据提供最佳安全性至关重要。

这篇关于使用DirectLine v3客户端(Microsoft Bot连接器)时,为什么连接会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆