I am working on Bots Project using Microsoft BotFramework, in that I am using to display some video files. Here I am facing the issue is when I am running my project in local Bot Frame work Emulator its getting the data properly at every time and I am configuring my Bot to Skype Channel its working first time properly and when I am using the second time it’s not getting the data some times and sometimes it’s getting data like only one video file that is nothing but first video file. Is there any proper solution for getting the complete data every time? For this I am write the below line of code in my method
Activity replyToConversation = message.CreateReply("Welcome to **My Bot**." + "(Hi)");
replyToConversation.Recipient = message.From;
replyToConversation.Type = "message";
replyToConversation.Attachments = new List<Attachment>();
Dictionary<string, string> cardContentList = new Dictionary<string, string>();
cardContentList.Add("Jason Bourne", "");
cardContentList.Add("The Land", "");
cardContentList.Add("Yoga Hosers", "");
foreach (KeyValuePair<string, string> cardContent in cardContentList)
{
if (cardContent.Key == "Jason Bourne")
{
replyToConversation.Attachments.Add(new Attachment()
{
ContentUrl = "https://ht39ea-bn1306.files.1drv.com/y3mz35iB6o_EJVzJvmSQz9_jNz5Cmpk33LgbGJQjpoZvQaBXrABBDvHrOS5gdHvqh_MIlJoFBIujrSkhkCGRnApldRbmT6W61NTEyOulUGUZtge9hRyKKvh9BHT-VYV_opRLSMnHt7g3b3IaiTNKcjZqQ/Jason%20Bourne%20Official%20Trailer%20%231%20(2016",
Name = "Jason Bourne"
});
}
else if (cardContent.Key == "The Land")
{
replyToConversation.Attachments.Add(new Attachment()
{
ContentUrl = "https://ht39ea-bn1306.files.1drv.com/y3mGspCfSmGDdvQjKK_3UcUIdnZRsAC2jRgHesmL61sIV_zc9F9UQQIWkyHE5E4t6r4T56aWKDQSfN-qduP2VJbiH0rYZ4Ce5DLI2U1DKx-4Tv4UB4OL2Egtk_-BWAow0fC4wf7HCC2ypyQ2dIXrs1hsw/The%20Land%20Official%20Trailer%201%20(2016",
ContentType = "video/mp4",
Name = "The Land"
});
}
else if (cardContent.Key == "Yoga Hosers")
{
replyToConversation.Attachments.Add(new Attachment()
{
ContentUrl = "https://ht39ea-bn1306.files.1drv.com/y3mThBzywEPjMFSh2rdNldHPW1oxtzVTXyrhLrJOp_ACh2YPLQcuw5W-MaSB_5DBJluNXJpvwWBcoWKcQO6Ijx7dWcj2MqHA2uFvvbH6h7mPKsiBhDuC8j5I4_qi-ZsdMuM2G6ztoUtAsdRV0pla-aOGQ/Yoga%20Hosers%20TRAILER%20(2016",
ContentType = "video/mp4",
Name = "Yoga Hosers"
});
}
}
replyToConversation.AttachmentLayout = AttachmentLayoutTypes.List;
await context.PostAsync(replyToConversation);