Bot在本地计算机上的Bot Framework Emulator中工作,但在将其部署到Microsoft Azure后无法使用-HTTP状态代码NotFound [英] Bot works in Bot Framework Emulator on local computer, but not after it's deployed to Microsoft Azure - HTTP status code NotFound

查看:158
本文介绍了Bot在本地计算机上的Bot Framework Emulator中工作,但在将其部署到Microsoft Azure后无法使用-HTTP状态代码NotFound的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我正在测试在 Virtual Studio Community 2019 中启动bot项目,在 Bot Framework Emulator(V4)中测试bot所需的步骤. >,然后将该机器人部署到Microsoft Azure.

Right now, I'm testing the steps required when it comes to starting a bot project in Virtual Studio Community 2019, testing a bot in Bot Framework Emulator (V4), and then deploying that bot to Microsoft Azure.

现在,我正在测试Virtual Studio Community 2019中提供的一个简单的Echo Bot模板.在Virtual Studio Community 2019中运行它时,请使用提供的本地主机" URL在Bot Framework Emulator中打开机器人,并对其进行测试在模拟器的实时聊天"窗口中,它工作正常.

Right now, I'm testing a simple Echo Bot template available in Virtual Studio Community 2019. When I run it in Virtual Studio Community 2019, open the bot in Bot Framework Emulator using a provided "localhost" URL, and test it in the emulator's "Live Chat" window, it works perfectly fine.

但是,在完成使用 Azure CLI(命令行工具)部署该机器人的过程之后,我发现当我进入在Web聊天中测试"时,该机器人没有响应. "以Bot频道注册资源命名,该资源以BotID命名.当我查看频道页面时,看到以下错误:"在向您的漫游器发送此消息时出错:HTTP状态代码未找到."

However, after I go through the process of deploying this bot using Azure CLI (command-line tool), I find that the bot doesn't respond when I go to "Test in Web Chat" for the Bot Channels Registration resource, which is named after the BotID. When I look at the channels page, I see the following error: "There was an error sending this message to your bot: HTTP status code NotFound."

我已经尝试为该漫游器打开"Always On",启用应用程序见解(ASP.NET,ASP.NET Core),并将应用程序见解服务与该漫游器集成.

I already tried turning on "Always On" for the bot, enabling Application Insights (ASP.NET, ASP.NET Core), and integrating an application insights service with the bot.

按照问题的注释部分中"mdrichardson-MSFT"的要求,我在https://"botname" .scm.azurewebsites.net/dev/wwwroot/上附加了该机器人文件的图片.

I attached an image of the bot's files at https://"botname".scm.azurewebsites.net/dev/wwwroot/ as requested by "mdrichardson - MSFT" in the comment section of the question.

启动文件目录

我应该如何解决此问题?

How should I resolve this issue?

推荐答案

您似乎缺少了

这将创建一个.deployment文件,该文件在部署时会上载.上传后,它会告诉Kudu/Azure构建该机器人.它应导致您的目录中包含一堆.dll文件,看起来更像这样:

This creates a .deployment file that gets uploaded when you deploy. Once uploaded, it tells Kudu/Azure to build the bot. It should result in your directory containing a bunch of .dll files, looking more like this:

您可能没有错过该步骤,在这种情况下,您只需将.deployment文件包含在code.zip中,然后重新运行即可:

It's possible that you didn't miss that step, in which case you just need to include the .deployment file in your code.zip and then re-run:

az webapp deployment source config-zip --resource-group "<yourGroup>" --name "<yourBot>" --src "code.zip"

或者...

由于您使用的是Visual Studio模板,因此您可以:

Alternatively...

Since you're using the Visual Studio Template, you can:

  1. 在Visual Studio中右键单击您的项目,转到发布"

  1. 留在应用程序服务"选项卡上,单击发布",然后按照步骤进行部署.

这篇关于Bot在本地计算机上的Bot Framework Emulator中工作,但在将其部署到Microsoft Azure后无法使用-HTTP状态代码NotFound的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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