botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

BOT is working in Emulator but not in the web chat channel after publishing to Azure

Open sumit84mca opened this issue 8 years ago • 7 comments

Bot Info

  • SDK Platform:.Net
  • SDK Version: Microsoft.Bot.Builder 3.12.2.4, Microsoft.Bot.Connector 3.12.2.4
  • Active Channels: Web
  • Deployment Environment: Azure Bot Service, Azure App Service, local development with Emulator?

Issue Description

First I created the bot in Azure Portal. Then downloaded the code and started adding functionality to it. Now my bot is created and working fine on BOT Emulator. I published it on Azure portal. Then I tried to test in "Test in Web Chat" but it is taking the long time to load the page. After waiting for more than 20 minutes. I tried to test it on my web page(on my local machine) using the Iframe code(copied from the channel page). I provided the required key. When I send a message then it was not able to send it. image Then I saw issues on "Connect to channel" page

image.

Working BOT in Emulator image

Please help.

sumit84mca avatar Feb 23 '18 13:02 sumit84mca

Is the MicrosoftAppId and MicrosoftAppPassword in the web.config, or application settings?

EricDahlvang avatar Feb 23 '18 17:02 EricDahlvang

Please find the screenshot of the web.confign and Application settings. I have places same keys in both places.

Settings on Azure Portal image

Settings in Web.Config file of the BOT Application image

sumit84mca avatar Feb 26 '18 07:02 sumit84mca

Have you tried debugging locally? https://blog.botframework.com/2017/10/19/debug-channel-locally-using-ngrok/

EricDahlvang avatar Feb 26 '18 18:02 EricDahlvang

@sumit84mca It's your bot url? http://bankdisputechatbot.azurewebsites.net On URL http://bankdisputechatbot.azurewebsites.net/api/messages you has error "Multiple types were found that match the controller named 'messages'. This can happen if the route that services this request ('api/{controller}/{id}') found multiple controllers defined with the same name but differing namespaces, which is not supported." image Try fix route address for this controller.

Also when you publish bot try select item "Remove additional files at destination" image

flash2048 avatar Feb 27 '18 02:02 flash2048

Thanks @flash2048 My issue is resolved.

sumit84mca avatar Feb 27 '18 06:02 sumit84mca

I'm having a very similar issue. I assume the reason is because we have two different bots (A main bot and a test bot). That might be what is causing the conflicts between the controllers perhaps? @flash2048 How did you receive that page oh html? I've been trying to submit post requests to the messaging endpoint but I keep getting unauthorized. I've tried using the app id and also an access token from a login request.

As for 'fixing route address for this controller'. How would I go about doing this?

The above image refers to a Luis bot message controller. Our bot utilised Luis also, that couldn't be the source of the error could it?

I'm using microsoft bot connector direct line v3.02 and microsoft bot connector v3.19

The bot works perfectly locally and on skype. It refuses to take messages over webchat and it will take about 80% of messages over direct line but will refuse the rest. Please let me know if you need more detail

OBrien1510 avatar Jan 17 '19 11:01 OBrien1510

I am facing error There was an error sending this message to your bot: HTTP status code NotFound. I have deployed Bot in local IIS. Configured in Azure. Testing with ngrok . App Id & App Password is configured same as Azure setting configuration. Bot works well with Emulator but not with Axure Test in Web Chat . am I missing anything.?

dnyati avatar Nov 18 '19 09:11 dnyati