Search code examples
c#visual-studiobotframeworkazure-qna-maker

Bot framework code not working after downloading code from portal and testing locally


My bot framework code which was downloaded from Azure web bot services will not run locally in the Bot emulator. I'm using the /api/messages URL.

I have registered the bot with the bot framework and supplied the following configuration:

  • bot handle in BotId
  • app ID in MiscrosoftAppId,Azure storage in AzureWebJobsStorage,
  • QnA subscription key in QnAAuthKey,
  • QnA knowledge base id in QnAKnowledgebaseId
  • app password in MicrosoftAppPassword

in my web.config file and ensured that the required references Bot.builder.services and CognitiveServices.QnAMaker are updated.

Issue Message:"BotAuthenticator failed to authenticate incoming request!"

Is there some special configuration required to make this run locally so I can use a debugger on it? If so, where and what?


Solution

  • Try commenting MiscrosoftAppId and MicrosoftAppPassword in web.config. Create a new bot in emulator and leave these fields empty.