Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This is a POC with a local directline controller that allows a directline client connects to bot directly without using anything in the middle, no directline app service extension (DL-ASE) required.
This serves as an alternative to the current DL-ASE solution in network isolated scenarios, where customers are looking for highly controlled network environment, for example, both clients and bots and all the traffics must be within same VNET, which can't be done with public directline service.
Features
ToDo
Design
Motivation
This is to address some of the challenges and issues we are facing for the current DL-ASE solution, including but not limited to the followings
Architecture
A comparison of DL-ASE and this local directline controller is
Core differences
Comparing to DL-ASE, the solution of local directline controller has a few advantages
Local directline controller
With a local directline controller that builds into the bot application, we will get a few benefits
Implementation changes
TBD
How to use
There are 3 changes in this PR that you need to pick into your bot
See the updates to samples/csharp_dotnetcore/02.echo-bot/AdapterWithErrorHandler.cs
This is to add one method to expose an internal protected method out. This is likely not going to need in next iteration of this POC with latest SDK.
Please copy this new directline controller into your controller folder.
(Optional) Please update the namespace to align with the namespace you use for your existing controllers.
The startup.cs change is to support CORS, if you want to test this bot in web pages.
This is not needed for calling this API using clients directly.
Please update your client to point to /v3/directline. Removing the /.bot/ part in the url.
You can also update the routing part in directline controller to whatever path your like.
(Optional) Clean up your DL-ASE setup
(Applies to dotnet clients) Make sure ChannelId is included inside the Activity object
When you are sending out an activity from the dotnet client, make sure the Activity object has the following property set ChannelId = "webchat".