microsoft / BotBuilder-Samples

Welcome to the Bot Framework samples repository. Here you will find task-focused samples in C#, JavaScript/TypeScript, and Python to help you get started with the Bot Framework SDK!
https://github.com/Microsoft/botframework
MIT License
4.37k stars 4.87k forks source link

Address .NET Core 3.1 change around hostingModel default value #2531

Closed stevengum closed 6 months ago

stevengum commented 4 years ago

Sample information

  1. Sample type: \samples\
  2. Sample language: dotnetcore
  3. Sample name: All dotnetcore samples and generators

Describe the bug

In .NET Core 3.1, the hosting model default switched from "outofprocess" to "inprocess" which does not work with DL ASE (which uses "outofprocess"). By having a mismatch for the hosting model, the two will never be able to talk to each other.

Per @DDEfromOR, this 3.1 breaking change also results in problems around deploying a DL Token server from the same App Service, so we should investigate and determine the best course of action.

[bug]

stevengum commented 4 years ago

Migration docs: 2.2 -> 3.0

stevengum commented 4 years ago

After speaking with @Jeffders and @johnataylor, the hostingModel change to "outofprocess" would specifically target the Echo and Core bot samples and generators for .NET.


Edit: Along with the Web App Bot templates for Echo and Core bot.

stevengum commented 4 years ago

To be explicit, there's a number of changes that need to be performed to make Echo and Core bot work out-of-the-box with minimal customer-driven changes.

Add logic to Startup.cs/index.js/ts to connect to the NamedPipe

adapter.useNamedPipe(async (context) => {
    await myBot.run(context);
    },
    process.env.APPSETTING_WEBSITE_SITE_NAME + '.directline'
);

.NET: Update hosting process

JS/TS: web.config for iisnode

Add appropriate code comments and documentation links in the samples/generators

stevengum commented 4 years ago

Samples don't necessarily ship directly in sync with our milestones, this work will likely happen after 4.11 is out the door.

gandiddi commented 6 months ago

ASP.NET Core 3.0 or later(Migration docs: 2.2 -> 3.0) apps hosting model default changed to the in-process hosting model to improve performance and simplify deployment.

To configure an app for out-of-process hosting, set the value of the <AspNetCoreHostingModel> property to OutOfProcess in the project file (.csproj):

<PropertyGroup>
  <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>