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

浪子不回头ぞ 提交于 2020-01-25 00:28:07

问题


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.


回答1:


There's an update on dec 14. You need to set your SecurityProtocol to 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. "



来源:https://stackoverflow.com/questions/53633973/why-does-connection-get-closed-when-using-directline-v3-client-microsoft-bot-co

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!