Reputation: 725
I am developing a bot using Microsoft bot builder (C# LUIS template) and setting up Bot Emulator to debug my code locally but when I send message on bot emulator it gives below error:
POST 401 directline.postActivity
Emulator JSON Inspector giving more details which seems related to authentication
"BotAuthenticator failed to authenticate incoming request!"
For running code locally I am not passing any value for below settings in web.config and also not passing any value for app id and password from emulator.
<add key="MicrosoftAppId" value="" />
<add key="MicrosoftAppPassword" value="" />
I checked all web.config appsetting are same as Application Settings in azure WebApp. Also using InMemory store for local debugging, below is code from global.asax.cs
var store = new InMemoryDataStore();
Endpoint url is also correct in emulator
http://localhost:3984/api/messages
I also installed ngrok but no luck.
Upvotes: 0
Views: 6855
Reputation: 725
There was issue with AppSettings in web.config file. So if you see this error make sure you have correctly provided key-value under AppSettings in web.config file
Upvotes: 1