简体   繁体   English

Microsoft bot 框架 session 用户不活动后超时

[英]Microsoft bot framework session timeout after user inactivity

I'm working on a scenario where the user is warned after 1 minute of inactivity and after another, 1-minute chat will auto close.我正在处理一种情况,即用户在 1 分钟不活动后收到警告,然后 1 分钟聊天将自动关闭。

Callback is successfully invoked after 1 minute but when I'm using turnContext to send a message to user then it shows an exception that "cannot access a disposed object" 1 分钟后成功调用回调,但是当我使用 turnContext 向用户发送消息时,它显示“无法访问已处置对象”的异常

enter image description here在此处输入图像描述

enter image description here在此处输入图像描述

can we prevent to dispose object for some time or if there is any other solution so please help me.我们能否阻止一段时间内处理 object 或者如果有任何其他解决方案,请帮助我。

Thank you!谢谢!

you can't prevent the object你无法阻止 object

here you can find how to implement expire conversation Automatically Expire Conversation & download the Nuget package Automatically Expire Conversation在这里您可以找到如何实现会话过期自动过期会话并下载 Nuget package 自动过期会话

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM