Search code examples
c#botframeworkmiddlewareazure-language-understandingazure-qna-maker

bot thrown error with luis publishing on azure but work fine with emulator


I have bot made in framework v4 using c# having middleware in it. It work fine on emulator but throw error after getting publish on azure. Can any one knows the possible cause of it. It mainly throw error with luis part on azure. Error msg is Sorry, it looks like something went wrong: No such host is known... please any one help me out

{
     "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "ConnectionStrings": {
    "DBConnection": ""
  },

  "smsApiUrl": "",
  "Employee": "",
  "Token": "",

  "MicrosoftAppId": "",
  "MicrosoftAppPassword": "",

  "BotBasePath": "/api",
  "BotMessagesPath": "/messages",
  "AzureTableStorageConnectionString": "",
  "RejectConnectionRequestIfNoAggregationChannel": true,
  "PermittedAggregationChannels": "",
  "NoDirectConversationsWithChannels": "emulator, facebook, skype, msteams, webchat",


  "LuisAppId": "",
  "LuisAPIKey": "",
  "LuisAPIHostName": "westus",

  "QnAKnowledgebaseId": "",
  "QnAEndpointKey": "",
  "QnAEndpointHostName": ""
}

Solution

  • As the bot is working just fine on the emulator locally, the problem seems to be the way you are publishing the bot on Azure. A few troubleshooting steps to follow would be :

    • Check if you have configured the "Microsoft AppID" and "Microsoft AppPassword" in the appsettings.json correctly.
    • Verify the LuisAPIHostname is set to "westus" in the Azure Portal> Your Resource Group > App service > Configuration
    • Double check if the keys are correct in the Azure Portal.
    • Verify if you missed any of the steps to deploy the bot on Azure.