具有凭据的模板中的Azure机器人在模拟器中不起作用 [英] Azure bot from template with credentials doesn't work in emulator

查看:82
本文介绍了具有凭据的模板中的Azure机器人在模拟器中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的机器人只是拒绝使用我的appId&开发者模拟器上的密码,因此尝试执行尽可能简单的版本.这是我尝试过的:

My bot just refuses to work with my appId & password on my dev emulator so tried to do the simplest version possible. This is what I tried:

  1. 从新复制的"Bot应用程序"模板中创建一个新的空白项目.
  2. 更新所有NuGet软件包(System.IdentityModel.Tokens.Jwt v5.1.4除外,因为它与Microsoft.Bot.Builder 3.8.1不兼容).
  3. 在没有AppId/密码的模拟器中对其进行测试,即可正常运行.
  4. 更新AppId& web.config中的密码.
  5. 再次运行模拟器,然后输入AppId&密码进入.

这是模板的全新解决方案,只是更改了我的凭据,这是它带来的错误:

So it's a brand new solution from the template with just with my credentials changed and this is the error that it gives:

POST 401 [conversationUpdate] 
Error: The bot's MSA appId or password is incorrect. 
Edit your bot's MSA info

我使用cUrl命令测试并收到令牌后,凭据绝对正确.

The credentials are definitely correct as I've tested then with the cUrl command and received the token.

我的开发机是Windows Server 2008 R2.

My dev machine is Windows Server 2008 R2.

推荐答案

在本地进行开发时,您不需要应用程序ID和密码.部署机器人后,您还可以通过 Bot Framework开发人员门户网络聊天来测试您的机器人.挂号的.

You don't need the App ID and password when you are developing locally. You can also test your bot via the Bot Framework Developer Portal web chat once your bot is deployed & registered.

场景1::如果您在本地计算机上运行漫游器代码,请不要在模拟器中使用应用程序ID或密码.

Scenario 1: If you are running your bot code on your local machine, don't use the app ID or password in the emulator.

场景2::如果您的漫游器已部署到Azure或其他云服务,则需要使用应用程序ID/pwd在模拟器中进行测试.在Azure上,推荐的方法是将MICROSOFT_APP_IDMICROSOFT_APP_PASSWORD添加到应用程序设置中,如文章

Scenario 2: If your bot is deployed to Azure or other cloud service, then you will need to use the app ID/pwd to test in the emulator. On Azure, the recommended method is to add your MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD to your application settings as described in step 10 of the article Deploying Bot Framework to Azure on Linux.

这篇关于具有凭据的模板中的Azure机器人在模拟器中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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