具有嵌入式 Web 视图的 Teams Messaging Extension - Web 应用程序的结构

Teams Messaging Extension with embedded web view - structure of web application

我再次需要有关消息扩展的帮助。我想在我的消息扩展中显示自定义 Web 视图,例如此处 https://docs.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/action-commands/create-task-module?tabs=dotnet(“使用嵌入式 Web 视图”)。 我现在不明白 Web 应用程序必须如何编写以及消息扩展是什么doing/calling。所以只输入一个正常的 url 是行不通的,我已经测试过了。 有谁能解释我的 Web 应用程序需要哪种 endpoint/structure 才能被消息扩展成功调用?我对 MS 提供的文档有点困惑。

感谢您的帮助!


更新: 我想更详细地描述我在做什么

'

 var response = new MessagingExtensionActionResponse()
        {
                    Task = new TaskModuleContinueResponse()
                    {
                        Value = new TaskModuleTaskInfo()
                        {
                            Height = "large",
                            Width = "large",
                            Title = "Example task module",
                            Url = "https://xxxxxx.eu.ngrok.io/messages/messages",                            
                        },
                    },
                };
                return response;

'

public IActionResult Messages()
{
    return View();
}
public MessagesController()
{
}

但是页面没有显示。 Teams 说它无法访问该应用程序。


更新 2


更新 3

图 1 - 显示浏览器开发工具,已建立与网站的连接

图 2 - 使用开发工具我强迫团队加载 iframe

我建议您查看为此提供的各种示例。 Bot Framework 示例库中有示例 (https://github.com/pnp/teams-dev-samples/tree/master/samples) and also in the Teams PnP Samples (https://github.com/pnp/teams-dev-samples/tree/master/samples). You can also look in the overall Teams Sample gallery viewer at https://pnp.github.io/teams-dev-samples/.

评论里议论纷纷,最后把showLoadingIndicator设置为true,这也是本题的一个复杂因素,需要改一下(或在网页中处理得更好 - 请参阅此处了解更多信息:)