Muggle
Muggle

Reputation: 79

Azure Web App - Cannot GET (particular path)

I have been trying out the AADv2 sample from BotAuth to no avail.

The error that I keep getting after I select the button on the action card is that either a HTTP 500 internal server error, or Cannot GET /botauth/aadv2. When I check if the root web page or the messaging endpoint is working or not, I get the same error - either Cannot GET / or Cannot GET \api\messages. The root page I have been trying to get to is https://(botname).azurewebsites.net

May I know what steps I can take to resolve this issue? I have tried to Google the error, but to no avail. Please let me know if you need more information!

Upvotes: 1

Views: 698

Answers (1)

Gary Liu
Gary Liu

Reputation: 13918

Since you are test the sample directly on Azure Web Apps, there should be a few of questions we should pay attention on.

1, const MICROSOFT_APP_ID = envx("MICROSOFT_APP_ID"); const MICROSOFT_APP_PASSWORD = envx("MICROSOFT_APP_PASSWORD"); we declare the environment valiable as MicrosoftAppId and MicrosoftAppPassword. Please modify this sentence as

//bot application identity
const MICROSOFT_APP_ID = envx("MicrosoftAppId");
const MICROSOFT_APP_PASSWORD = envx("MicrosoftAppPassword");

2, And you also need to check the environment variables are set correctly in Application settings of Azure Web App, which is shown at https://github.com/MicrosoftDX/botauth/tree/master/Node/examples/aadv2#3-setup-environment-variables

3, You can leverage online code editor to develop, debug, and manage your project on Azure Web Apps. enter image description here

And in the output column, you can see the detailed errors throwm by the application. You can leverage these info to narrow down your issue. enter image description here

Tips, after you changing the application settings, it's better to restart your Azure Web App.

Upvotes: 2

Related Questions