Search code examples
asp.netbotframeworkchatbot

Host MS BOT in a regular ASP.NET Project


I have a standard ASP.NET project i.e. web forms project that uses Entity Framework etc. Its standard C# ASP.NET Web Forms Project.

I want to code as Microsoft BOT that uses the BOT Framework 4.

Is it possible to code the BOT in the ASP.NET project? I am not sure if the BOT only works with ASP.NET Core?

Any insights here would be most useful.


Solution

  • If you're using Bot Framework v4, you will have to go the route of using ASP.NET Core, as the framework, is currently targeting Core 2.1, and soon to be 3.1.

    ASP.NET Framework and ASP.NET Core each have their own APIs and there is only a section of overlap. So the Bot Framework embraces .NET Core APIs, if you tried using ASP.NET, the framework could break on attempted use of an API that exists in Core, but does in .NET

    enter image description here

    Additionally, if you were using the dotnet SDK in v3, there is a migration story to go from v3 to v4 (which is effectively migrating from .NET to .NET Core)--in any case, to use newer bits of the framework, the push forward is to use cross-platform .net core instead of .net framework.