diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index cb82dbf88..bada0ec99 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -205,7 +205,8 @@ ConfigureAuth(app); - app.UseMvcWithDefaultRoute(); + app.UseRouting(); + app.UseEndpoints(e => e.MapDefaultControllerRoute()); app.UseSwagger() .UseSwaggerUI(c => diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index 9f8de6092..e4193a5f2 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -95,7 +95,8 @@ ConfigureAuth(app); - app.UseMvcWithDefaultRoute(); + app.UseRouting(); + app.UseEndpoints(e => e.MapDefaultControllerRoute()); app.UseSwagger() .UseSwaggerUI(c => @@ -155,7 +156,7 @@ { options.Filters.Add(typeof(HttpGlobalExceptionFilter)); }) - .SetCompatibilityVersion(CompatibilityVersion.Version_2_2) + .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) .AddControllersAsServices(); //Injecting Controllers themselves thru DI //For further info see: http://docs.autofac.org/en/latest/integration/aspnetcore.html#controllers-as-services diff --git a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs index 329fba070..23bca1977 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs +++ b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs @@ -148,6 +148,7 @@ namespace Ordering.SignalrHub app.UseAuthentication(); + app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapHub("/notificationhub", options => diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index 65baf8278..1f2ab41d1 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base +FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build +FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build WORKDIR /src COPY scripts scripts/ diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 9cc1828d9..5d3f6da5a 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base +FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build +FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build WORKDIR /src COPY scripts scripts/ diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index 92c1b2717..35c81d594 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base +FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base WORKDIR /app EXPOSE 80 -FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build +FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build WORKDIR /src COPY scripts scripts/ diff --git a/src/Web/WebStatus/Program.cs b/src/Web/WebStatus/Program.cs index c8c850cfd..efe3f051b 100644 --- a/src/Web/WebStatus/Program.cs +++ b/src/Web/WebStatus/Program.cs @@ -54,7 +54,7 @@ namespace WebStatus .UseSerilog() .Build(); - private static Serilog.ILogger CreateSerilogLogger(IConfiguration configuration) + private static Serilog.ILogger CreateSerilogLogger(IConfiguration configuration) { var seqServerUrl = configuration["Serilog:SeqServerUrl"]; var logstashUrl = configuration["Serilog:LogstashgUrl"]; diff --git a/src/Web/WebStatus/Startup.cs b/src/Web/WebStatus/Startup.cs index d36b2df90..48875eab5 100644 --- a/src/Web/WebStatus/Startup.cs +++ b/src/Web/WebStatus/Startup.cs @@ -1,7 +1,4 @@ -using HealthChecks.UI.Client; -using Microsoft.ApplicationInsights.Extensibility; -using Microsoft.ApplicationInsights.ServiceFabric; -using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; @@ -31,7 +28,7 @@ namespace WebStatus .AddCheck("self", () => HealthCheckResult.Healthy()); services.AddHealthChecksUI(); - + services.AddMvc() .SetCompatibilityVersion(CompatibilityVersion.Version_3_0); } @@ -64,20 +61,19 @@ namespace WebStatus Predicate = r => r.Name.Contains("self") }); - app.UseHealthChecksUI(config => { + app.UseHealthChecksUI(config => + { config.ResourcesPath = string.IsNullOrEmpty(pathBase) ? "/ui/resources" : $"{pathBase}/ui/resources"; - config.UIPath = "/hc-ui"; + config.UIPath = "/hc-ui"; }); - + app.UseStaticFiles(); app.UseHttpsRedirection(); - app.UseMvc(routes => + app.UseEndpoints(endpoints => { - routes.MapRoute( - name: "default", - template: "{controller=Home}/{action=Index}/{id?}"); + endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); }); } @@ -91,12 +87,6 @@ namespace WebStatus // Enable K8s telemetry initializer services.AddApplicationInsightsKubernetesEnricher(); } - if (orchestratorType?.ToUpper() == "SF") - { - // Enable SF telemetry initializer - services.AddSingleton((serviceProvider) => - new FabricTelemetryInitializer()); - } } } }