问题
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:
- Create a new blank project from the newly copied "Bot Application" template.
- Update all the NuGet packages (except System.IdentityModel.Tokens.Jwt v5.1.4 as it isn't compatible with Microsoft.Bot.Builder 3.8.1).
- Test it in the emulator with no AppId / Password and it works.
- Update the AppId & Password in the web.config.
- Run the emulator again and enter the AppId & Password into it.
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
The credentials are definitely correct as I've tested then with the cUrl command and received the token.
My dev machine is Windows Server 2008 R2.
回答1:
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.
Scenario 1: If you are running your bot code on your local machine, don't use the app ID or password in the emulator.
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.
来源:https://stackoverflow.com/questions/44662119/azure-bot-from-template-with-credentials-doesnt-work-in-emulator