简体   繁体   English

Microsoft Bot在Azure中使用但在团队中无法使用

[英]Microsoft Bot in Azure but not working in Teams when used

I have hosted my ASP.NET Web Application (.NET Framework) in Azure as an App Service through Visual Studio, which also created a new resource group, which it resides in. 我已经通过Visual Studio将Azure ASP.NET Web应用程序(.NET Framework)作为App Service托管在Azure中,该应用程序还创建了一个驻留在其中的新资源组。

This App service then created me a URL to use, which I suspect becomes my end point for my Bot eventually. 然后,此应用程序服务为我创建了一个要使用的URL,我怀疑该URL最终成为我的Bot的终点。 My next step was to create a Bot Channel after going on this link here https://dev.botframework.com . 我的下一步是在https://dev.botframework.com上转到此链接后,创建一个Bot频道。

Steps taken: 采取的步骤:

  • I registered a new Bot Channel with the endpoint being set to point to my app service (with /api/messages appended). 我注册了一个新的Bot Channel,并将其端点设置为指向我的应用程序服务(附加了/ api / messages)。 During this process I was taken to https://apps.dev.microsoft.com in order to generate an App Id and a secret for my app. 在此过程中,我被带到https://apps.dev.microsoft.com ,以便为我的应用程序生成应用程序ID和密码。
  • I then entered this information into the web.config file for my Bot. 然后,我将此信息输入到Bot的web.config文件中。
  • My next step was to go into MS Teams and create an application in "App Studio", which would have a Bot configured for it. 我的下一步是进入MS Teams,并在“ App Studio”中创建一个应用程序,为其配置一个Bot。 The configuration for the Bot included the app id of my Bot in Azure, which I suspect is the relation between the 2 so that I can use my Bot in Teams. Bot的配置包括Azure中Bot的应用程序ID,我怀疑这是两者之间的关系,以便我可以在团队中使用Bot。

However, when I try to use the Bot in Teams I get nothing back. 但是,当我尝试在团队中使用机器人时,我什么也得不到。 There is no error thrown or any message displayed back in Teams. 在团队中没有引发错误或显示任何消息。 I'm not sure where I have gone wrong with this so does anyone have any ideas on what I could try? 我不确定我哪里出错了,所以有人对我可以尝试的方法有任何想法吗?

New bots using the bot framework in Azure need to have their own custom state clients implemented. 在Azure中使用漫游器框架的新漫游器需要实现自己的自定义状态客户端。 Use the following link to do this https://blog.botframework.com/2017/12/19/bot-state-service-will-soon-retired-march-31st-2018/ . 使用以下链接执行此操作https://blog.botframework.com/2017/12/19/bot-state-service-will-soon-retired-march-31st-2018/ It should just be a minor change made to your "Global.asax.cs" file and "packages.config" file and that is all. 这只是对您的“ Global.asax.cs”文件和“ packages.config”文件进行的微小更改,仅此而已。 To make additional use of the state client you can save data to it, which you can retrieve later on by using the instructions on this link https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-state?view=azure-bot-service-3.0 . 要进一步利用状态客户端,您可以将数据保存到其中,以后可以使用此链接上的说明进行检索, 网址为https://docs.microsoft.com/zh-cn/azure/bot-service/dotnet/ bot-builder-dotnet-state?view = azure-bot-service-3.0

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

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