Using:
- SDK Language: C#
- SDK Version: 4.1.5
- Enviroment: Localhost, Azure
- Channel: webchat
Issue Description
When testing the bot in Bot Framework Emulator V4, it does work as expected as it can be seen in the next figure:
After Deploying it in Azure following this instructions, bot stops working (neither sending or receiving messages) and got this alerts in the webchat channel section:
I've found these similar issues:
https://github.com/Microsoft/BotFramework-Emulator/issues/296
https://github.com/Microsoft/BotBuilder/issues/3329
But in my case both AppId and Password are defined and the other solution simply doesn't work at all. I even managed to find the error codes on the azure platform, but I was unable to find the details or get where the error is coming from...
Code Overview
public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken))
{
bool reintentar = false;
//tried this but didn't work
//MicrosoftAppCredentials.TrustServiceUrl("http://botrps.azurewebsites.net");
//obtener el contexto de los dialogos
var dc = await _dialogs.CreateContextAsync(turnContext, cancellationToken);
if (turnContext.Activity.Type == ActivityTypes.Message && turnContext.Activity.From.Id != turnContext.Activity.Recipient.Id)
{
//bot operations on users messages
}
//if active dialog
await dc.ContinueDialogAsync(cancellationToken);
//else, start greeting dialog
if (turnContext.Activity.Type == ActivityTypes.ConversationUpdate &&
turnContext.Activity.MembersAdded[0].Id != turnContext.Activity.Recipient.Id)
{
await dc.BeginDialogAsync("dialogo", null, cancellationToken);
}
await _accessors.ConversationState.SaveChangesAsync(turnContext, false, cancellationToken);
// Guarda los cambios realizados en el Contexto, si hay alguno
await _accessors.UserState.SaveChangesAsync(turnContext, false, cancellationToken);
}
invalidOperationException
in the log (application insights?) show you any kind of stack trace? - UpQuark