With some modifications to @PiGi78 answer, it did work. Here is the final solution:
public class Startup{ public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddMvcOptions(ApplyMvcOptions); services.AddControllersWithViews(); services.AddControllers().AddNewtonsoftJson(); } private void ApplyMvcOptions(MvcOptions options) { options.EnableEndpointRouting = false; } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseMvc(); Bot.GetBotClientAsync().Wait(); }}
@PiGi78 thank you very much !