Reputation: 110
I’m using Azure Enterprise subscription and created a chat bot using same. But currently, I’m having trouble chatting using it. The bot is created using Visual studio using Bot framework and published to Azure. https://pihitsupportbot001.azurewebsites.net/ is my messaging end-point URL. I made bot channel registration for the same application and used the bot api endpoint with api/messages as end-point for it. Updated web config file with generated app ID and password and published. But when I try testing with web chat in Azure it is throwing ‘couldn’t send retry’. What would be the reason?
Upvotes: 0
Views: 250
Reputation: 110
The error was due to the reason In global.asax I didn't have any state specified to store the conversation history. Earlier Microsoft had been providing a default state service for bots built using either the Node.js or .NET SDK’s. The state service is used to store and retrieve user and conversation data within the context of a conversation. But in fact in local while running using emulator or even in IIS, it doesn't need to have it. below is the documentation.
Bot State Service will soon be retired on March 31st, 2018
var store = new TableBotDataStore(ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString);
Conversation.UpdateContainer(
builder =>
{
builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();
builder.Register(c => new CachingBotDataStore(store,
CachingBotDataStoreConsistencyPolicy
.ETagBasedConsistency))
.As<IBotDataStore<BotData>>()
.AsSelf()
.InstancePerLifetimeScope();
});
Upvotes: 0
Reputation: 831
Jobin,
I was able to connect the bot emulator from my local pc to your endpoint, https://pihitsupportbot001.azurewebsites.net/api/message without, obviously, your appid and app password. I sent a 'hello' and received a sign-in card response. So, the bot appears to be working fine. Maybe the app service was still restarting after you edited the web.config?
Also, It's very hard to help diagnose these kinds of problems with limited information.
Upvotes: 1