-2

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": ""
}
Md Farid Uddin Kiron
  • 16,817
  • 3
  • 17
  • 43
  • @mdrichardson - MSFT can you plez help? – shivani singh Jan 17 '20 at 06:23
  • How are you connecting to the bot, and what address are you using in the bot Settings page? Also, where/how is it actually hosted (is the bot *itself* hosted in Azure, or just the Channels registration? - send a screenshot perhaps of the bot page that will help clarify) – Hilton Giesenow Jan 17 '20 at 07:21
  • its is hosted on azure and made using web bot – shivani singh Jan 17 '20 at 08:21
  • ah, that's a lot more detail, thanks! Note that your "luisapihostname" is not actually a complete hostname - it's just a "region". The complete hostname would have an entire url in there. What code are you using to construct the Luis endpoint? (Of course you need a value in the LuisAppId and LuisAPIKey, but those are maybe blank in your example above just for privacy, and you have a -real- value inside your app?) – Hilton Giesenow Jan 17 '20 at 08:43
  • it's strange that it worked fine in the emulator though - if that's the case, it's probably something to do with your configuration in the Azure web app – Hilton Giesenow Jan 17 '20 at 09:09
  • yaa its working fine on emulator..i don't know wat do – shivani singh Jan 17 '20 at 09:16
  • yes they are blank due do privacy – shivani singh Jan 17 '20 at 09:17
  • Then check your "LuisAPIHostName" property, between local and azure version. Maybe the one has a full address? – Hilton Giesenow Jan 17 '20 at 09:18
  • Also check where in your application the "LuisApplication" instance is created - try debug there and see what endpoint address is getting created. For example, I have this is one sample: var luis = service as LuisService; var luisApp = new LuisApplication(luis.AppId, luis.SubscriptionKey, luis.GetEndpoint()); in this case, luis.GetEndpoint() is generating the endpoint based on the config, and it should be generating a full address like for example : "https://westus.api.cognitive.microsoft.com/luis/api/v2.0" that should help you figure out what in the config might be wrong – Hilton Giesenow Jan 17 '20 at 09:20
  • Can you verify that LuisAPIHostName is set to "westus" in Azure Portal > Your Resource Group > App Service > Configuration? Also, can you verify that your keys are correct in the Azure Portal? – ranusharao Jan 17 '20 at 19:51

1 Answers1

0

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.
ranusharao
  • 1,826
  • 1
  • 8
  • 17