I created a Bot on Azure Bot Framework and link it to Skype with out any issues. It works well when I add it to my contacts, but I would like to publish the bot to be able to add my bot to a Group. When i submit the request it returns:
Your bot did not respond to our Ping request with a success code. Please verify your bot is running and responsive before Publishing your bot. The error received from your bot was: InternalServerError(500), Internal Server Error
Does anyone know what is the issue here?
It might be caused by your code not handling correctly system messages.
The following is an example of a method for handling system messages, that should be called when message.Type == "Message"
:
private Message HandleSystemMessage(Message message)
{
if (message.Type == "Ping")
{
Message reply = message.CreateReplyMessage();
reply.Type = "Ping";
return reply;
}
else if (message.Type == "DeleteUserData")
{
// Implement user deletion here
// If we handle user deletion, return a real message
}
else if (message.Type == "BotAddedToConversation")
{
}
else if (message.Type == "BotRemovedFromConversation")
{
}
else if (message.Type == "UserAddedToConversation")
{
}
else if (message.Type == UserRemovedFromConversation")
{
}
else if (message.Type == "EndOfConversation")
{
}
return null;
}
Update
Instead of the message instance (depending if you are using .Net Core for example), try looking for an instance of Activity . You should see it as the parameter of your post method in your API controller.
Hope it helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.