microsoft-graph-comms-samples
microsoft-graph-comms-samples copied to clipboard
Echo Bot showing object reference error
Describe the issue When executing the code on my local machine, it displays the error message: 'Object reference not set to an instance of an object.
Code Snippet var botInternalHostingProtocol = "https"; if (appSettings.UseLocalDevSettings) - The error displays here. { // if running locally with ngrok // the call signalling and notification will use the same internal and external ports // because you cannot receive requests on the same tunnel with different ports
// calls come in over 443 (external) and route to the internally hosted port: BotCallingInternalPort
botInternalHostingProtocol = "http";
builder.Services.PostConfigure<AppSettings>(options =>
{
options.BotInstanceExternalPort = 443;
options.BotInternalPort = appSettings.BotCallingInternalPort;
});
} else { //appSettings.MediaDnsName = appSettings.ServiceDnsName; builder.Services.PostConfigure<AppSettings>(options => { options.MediaDnsName = appSettings.ServiceDnsName; }); }
Expected behavior We have to execute and run the Echobot.