From 3bdc7c102a0b04433ae4ea1b071eb004b91a3ecc Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 6 Oct 2019 01:21:00 +0900 Subject: [PATCH] Fix Startup in netcoreapp3.0 --- BTCPayServer/Hosting/Startup.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BTCPayServer/Hosting/Startup.cs b/BTCPayServer/Hosting/Startup.cs index ee8d071dc..1907b84b7 100644 --- a/BTCPayServer/Hosting/Startup.cs +++ b/BTCPayServer/Hosting/Startup.cs @@ -270,6 +270,9 @@ namespace BTCPayServer.Hosting app.UseStaticFiles(); app.UseProviderStorage(options); app.UseAuthentication(); +#if !NETCOREAPP21 + app.UseAuthorization(); +#endif app.UseSession(); #if NETCOREAPP21 app.UseSignalR(route => @@ -292,6 +295,7 @@ namespace BTCPayServer.Hosting { AppHub.Register(endpoints); PaymentRequestHub.Register(endpoints); + endpoints.MapControllers(); endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); }); #endif