question

ShouvikMitra-5337 avatar image
0 Votes"
ShouvikMitra-5337 asked BhargaviMohan-0683 commented

BOT Channel in Azure not working but same hosted end point is working in BOT emulator

Hi,
I have hosted a Python 3.6 chat bot application on Web App service in Azure. Then registered a channel BOT with the end points. Tried testing through Web chat but BOT is not sending back any response.

The Web Channels log show There was an error sending this message to your bot: HTTP status code InternalServerError

When I paste the end point URL on browser it gives 405 Method not allowed

Please advise.

The same URL when tested in BOT emulator through ngrok tunnel , it is working fine.

Appreciate any suggestion.
thanks

azure-bot-service
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, thanks for reaching out. Since you've debugged locally and its working fine, here are some suggestions - ensure that your are using https instead of http url and that you have provided your MicrosoftAppId and MicrosoftAppPassword in the web.config file. Let me know if this doesn't resolve your issue so we can investigate further. Thanks.


0 Votes 0 ·

Hi,

I have used https only.
Where do I have to apply MicrosoftAppId and Pwd. It is a Python application. So didn't get which web config you meant. Kindly advise
Also how do I create this MicrosoftAppid and password please

Thanks

0 Votes 0 ·

Also how do I create MicrosoftAppId and MicrosoftAppPassword please?

0 Votes 0 ·

1 Answer

GiftA-MSFT avatar image
0 Votes"
GiftA-MSFT answered BhargaviMohan-0683 commented

Hi, pardon me, web.config file is not related to your python application. Once you deploy your bot to azure, you'll obtain a Microsoft App ID and Microsoft App Password that you can use for authentication. The Microsoft App ID and Microsoft App Password are located in Azure Portal > ResourceGroup > Web App Bot > App Service Settings > Configurations. First, verify that your the App ID and Password are valid and configured your bot with the correct App ID and Password. Ensure that your bot is running, included the proper path (e.g., /api/messages) and specified https url. Here are additional resources. Please share code repo if issue persists so we can investigate further. Thanks.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
I never created Microsoft App ID/pwd. Steps I did was :
1. Created a Web App Service
2. Deployed Python app using GitHob deployment
3. Created a BOT channel registration and added the end point/api/messages to it. There was auto create Microsoft App id which I opted.
4. Now when I go to AppSettings there is a manage link on top of Microsoft App Id clicking which I see I a message that admin has not allowed this page for me. However I can do via power shell cmd.

please advise

Thanks




0 Votes 0 ·

Hello, sorry for the delayed response and for not clarifying enough. So, you should have a config file for your app. Within the file, you need to specify the MicrosoftAppId and MicrosoftAppPassword as shown here for example before deploying, otherwise you'll get that error as highlighted in this thread (although specific to .NET but you get the idea). Let me know how it goes. Thanks.


0 Votes 0 ·

Hi

I have the same issue. But , AppId and password is correctly updated in config file and https endpoints are taken care of.

My bot works well with ngrok url but with new URL obtained while deployment fails.

Any insights on this will be of great help.

Thanks!

0 Votes 0 ·