Reputation: 3293
I created a Web App Bot in Azure with a basic template, downloaded the files and tested it with no problems on localhost with the Bot Framework Emulator.
However, once I renamed the solution/project/namespaces from the default Microsoft.Bot.Samples.SimpleEchoBot
to MyBotName
, the Bot Emulator received 500 - Internal Server Error
.
The solution builds and runs, and setting a breakpoint in the MessagesController shows that the Post method is never reached.
How do I fix this?
Upvotes: 1
Views: 446
Reputation: 3293
A GET request to localhost:[PORT]/api/messages (open that url in the browser) reveals the error message Multiple types were found that match the controller named 'messages'
. It was somehow finding both the old messages controller (Microsoft.Bot.Samples.SimpleEchoBot.MessagesController
) and the new one (MyBotName.MessagesController
).
Solution: delete the bin/
folder and re-build/run the project.
Upvotes: 2