Quantcast
Channel: User Yura Babiy - Stack Overflow
Viewing all articles
Browse latest Browse all 39

Answer by Yura Babiy for Why is Asp.Net Core Kestrel server returns 404 to Ngrok and Controller is never gets called?

$
0
0

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 !


Viewing all articles
Browse latest Browse all 39

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>