Kelsey Kelsey - 3 months ago 26
C# Question

Null botId - Microsoft Bot Framework SDK V3

I am trying to locally run the EchoBot example of the MS Bot Framework, following the updates to SDK V3, and am unable to create a dialog.

At the call to

Conversation.SendAsync(activity, () => EchoChainDialog.dialog);


The error I get is

System.ArgumentNullException occurred
HResult=-2147467261
Message=Value cannot be null.
Parameter name: botId
ParamName=botId
Source=Microsoft.Bot.Builder
StackTrace:
at Microsoft.Bot.Builder.Internals.Fibers.SetField.CheckNull[T](String name, T value)
InnerException:


I'm wondering what the null botID means. I'm running the app locally, following the Getting Started tutorial. It says that don't need to supply an AppID for the bot, and I'm fairly certain AppId and botId aren't the same thing. I can't seem to find much documentation on what this botId field is.

Has anyone else experienced this issue? Is the only way around this registering the bot and providing an AppId?

Answer

Apparently you can do

ConfigurationManager.AppSettings["BotId"] = "test";

And it will work. I'm not sure what is supposed to set the "BotId" field, but if you're running into this issue and just need test locally, adding this line in MessagesController.cs before a call to Conversation.SendAsync is a workaround.

Comments