问题
I have a C# bot developed in Visual Studio which runs successfully on a bot emulator in desktop. This bot was published to Azure and again ran successfully in the bot emulator. I think this means that the app-ID and password of the bot are correct. However the same bot wouldn't work in web chat or in the "Test in Web Chat" window in Azure portal. It always replies with - couldn't send retry. Could someone please help me out?
Update: An inspection of "Issues" in Channel window gives the following error:- There was an error sending this message to your bot.
回答1:
the same bot wouldn't work in web chat or in the "Test in Web Chat" window in Azure portal. It always replies with - couldn't send retry.
To troubleshot the issue, you can try:
In Settings blade, please check the Messaging endpoint that you specified and make sure it is same as your using in the bot emulator.
In the Application Settings blade, please check if you specify the correct MicrosoftAppID and MicrosoftAppPassword for your bot.
In Channels blade, please check the error message by clicking the "Issues" link for the affected channel.
- The bot application is hosted as Azure web app, try to remote debug your code and check if the code is executed as expected.
Besides, if possible, you can try to create a new bot on Azure portal, and publish your bot application to corresponding web application that you specified as messaging endpoint, and check if web chat works fine with that new bot.
回答2:
Well I'd made a mistake in configuration. I had configured the messaging endpoint as an http URL. However bot configuration only seems to work with an https URL. Changing http to https fixed my problem. Thanks everyone for the suggestions!
来源:https://stackoverflow.com/questions/49144699/there-was-an-error-sending-this-message-to-your-bot-test-in-web-chat