From 50a1e1311e058290c69c91fc93f4d75f9eadc18a Mon Sep 17 00:00:00 2001 From: Erik Pique Date: Thu, 25 Jul 2019 11:30:17 +0200 Subject: [PATCH] update preview7 --- .../Mobile.Shopping.HttpAggregator.csproj | 1 + .../Mobile.Bff.Shopping/aggregator/Startup.cs | 4 +- .../Web.Bff.Shopping/aggregator/Startup.cs | 4 +- .../Web.Shopping.HttpAggregator.csproj | 1 + .../Basket/Basket.API/Basket.API.csproj | 1 + src/Services/Basket/Basket.API/Startup.cs | 4 +- .../Catalog/Catalog.API/Catalog.API.csproj | 1 + src/Services/Catalog/Catalog.API/Startup.cs | 2 + src/Services/Identity/Identity.API/Startup.cs | 39 +++++++++++-------- .../Locations.API/Locations.API.csproj | 1 + .../Location/Locations.API/Startup.cs | 3 ++ .../Marketing.API/Marketing.API.csproj | 1 + .../Marketing/Marketing.API/Startup.cs | 3 +- .../Ordering/Ordering.API/Ordering.API.csproj | 1 + src/Services/Ordering/Ordering.API/Startup.cs | 4 +- .../Ordering.BackgroundTasks.csproj | 1 + .../Ordering.SignalrHub.csproj | 1 + .../Payment/Payment.API/Payment.API.csproj | 1 + src/Services/Webhooks/Webhooks.API/Startup.cs | 5 ++- .../Webhooks/Webhooks.API/Webhooks.API.csproj | 1 + src/Web/WebMVC/Startup.cs | 2 + src/Web/WebMVC/WebMVC.csproj | 5 ++- src/Web/WebSPA/Startup.cs | 3 +- src/Web/WebSPA/WebSPA.csproj | 1 + src/Web/WebStatus/Startup.cs | 4 +- src/Web/WebStatus/WebStatus.csproj | 1 + src/Web/WebhookClient/Startup.cs | 8 ++-- src/Web/WebhookClient/WebhookClient.csproj | 1 + src/_build/dependencies.props | 21 +++++----- 29 files changed, 83 insertions(+), 42 deletions(-) diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj index d8d54643f..fdf05ab76 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj @@ -6,6 +6,7 @@ Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator ..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs index 716f0ec5c..d63e82749 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs @@ -50,6 +50,8 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator .AddCustomAuthentication(Configuration) .AddDevspaces() .AddHttpServices(); + + services.AddControllers(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -80,6 +82,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -89,7 +92,6 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator { Predicate = r => r.Name.Contains("self") }); - endpoints.MapDefaultControllerRoute(); }); app.UseSwagger().UseSwaggerUI(c => diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs index b8ef7b459..1c4655132 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs @@ -50,6 +50,8 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator .AddCustomAuthentication(Configuration) .AddDevspaces() .AddApplicationServices(); + + services.AddControllers(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -79,6 +81,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -88,7 +91,6 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator { Predicate = r => r.Name.Contains("self") }); - endpoints.MapDefaultControllerRoute(); }); app.UseSwagger() diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj b/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj index 10d890062..a3eaa1ae6 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj @@ -6,6 +6,7 @@ Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator ..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index 9c09a08bc..5281f9107 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -5,6 +5,7 @@ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 6a23c76d4..1273428fd 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -60,6 +60,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) .AddControllersAsServices(); + services.AddControllers(); + ConfigureAuthService(services); services.AddCustomHealthCheck(Configuration); @@ -200,6 +202,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -209,7 +212,6 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API { Predicate = r => r.Name.Contains("self") }); - endpoints.MapDefaultControllerRoute(); }); app.UseSwagger() diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index f20ba1c7d..0b32dea4b 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -9,6 +9,7 @@ aspnet-Catalog.API-20161122013618 ..\..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 24d3395b0..5e96f90d8 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -55,6 +55,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API .AddSwagger() .AddCustomHealthCheck(Configuration); + services.AddControllers(); + var container = new ContainerBuilder(); container.Populate(services); diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index fd8e94c59..fbfff9828 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.eShopOnContainers.Services.Identity.API.Certificates; using Microsoft.eShopOnContainers.Services.Identity.API.Data; @@ -39,13 +40,13 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API // Add framework services. services.AddDbContext(options => - options.UseSqlServer(Configuration["ConnectionString"], - sqlServerOptionsAction: sqlOptions => - { - sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); - //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency - sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); - })); + options.UseSqlServer(Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + })); services.AddIdentity() .AddEntityFrameworkStores() @@ -94,17 +95,20 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API }); }) .AddOperationalStore(options => - { - options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, - sqlServerOptionsAction: sqlOptions => - { - sqlOptions.MigrationsAssembly(migrationsAssembly); - //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency - sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); - }); - }) + { + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(migrationsAssembly); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }) .Services.AddTransient(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0); + services.AddControllers(); + var container = new ContainerBuilder(); container.Populate(services); @@ -152,6 +156,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); + endpoints.MapControllers(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -161,7 +167,6 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API { Predicate = r => r.Name.Contains("self") }); - endpoints.MapDefaultControllerRoute(); }); } diff --git a/src/Services/Location/Locations.API/Locations.API.csproj b/src/Services/Location/Locations.API/Locations.API.csproj index 10b2a6f9b..a085f48a9 100644 --- a/src/Services/Location/Locations.API/Locations.API.csproj +++ b/src/Services/Location/Locations.API/Locations.API.csproj @@ -5,6 +5,7 @@ ..\..\..\..\docker-compose.dcproj aspnet-Locations.API-20161122013619 false + true $(LangVersion) diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs index 7b4a391af..d71f05d60 100644 --- a/src/Services/Location/Locations.API/Startup.cs +++ b/src/Services/Location/Locations.API/Startup.cs @@ -51,6 +51,8 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) .AddControllersAsServices(); + services.AddControllers(); + ConfigureAuthService(services); services.Configure(Configuration); @@ -174,6 +176,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj index e07d4e444..486ec9b39 100644 --- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj +++ b/src/Services/Marketing/Marketing.API/Marketing.API.csproj @@ -6,6 +6,7 @@ Microsoft.eShopOnContainers.Services.Marketing.API $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false + true aspnet-Marketing.API-20161122013619 /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index e2d54814b..24064d3a3 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -59,6 +59,7 @@ .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) .AddControllersAsServices(); //Injecting Controllers themselves thru DIFor further info see: http://docs.autofac.org/en/latest/integration/aspnetcore.html#controllers-as-services + services.AddControllers(); services.Configure(Configuration); ConfigureAuthService(services); @@ -200,6 +201,7 @@ app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -209,7 +211,6 @@ { Predicate = r => r.Name.Contains("self") }); - endpoints.MapDefaultControllerRoute(); }); app.UseSwagger() diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj index bb038d2e5..f61a94b72 100644 --- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj +++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj @@ -6,6 +6,7 @@ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index a987f7bcb..4e9480e70 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -56,6 +56,8 @@ .AddEventBus(Configuration) .AddCustomAuthentication(Configuration); + services.AddControllers(); + //configure autofac var container = new ContainerBuilder(); @@ -87,6 +89,7 @@ app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -96,7 +99,6 @@ { Predicate = r => r.Name.Contains("self") }); - endpoints.MapDefaultControllerRoute(); }); app.UseSwagger() diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj b/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj index ab193ddb9..3cca3adb7 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj @@ -5,6 +5,7 @@ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj b/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj index 93bed4711..3da5b61f7 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj +++ b/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj @@ -4,6 +4,7 @@ $(NetCoreTargetVersion) ..\..\..\..\docker-compose.dcproj false + true $(LangVersion) diff --git a/src/Services/Payment/Payment.API/Payment.API.csproj b/src/Services/Payment/Payment.API/Payment.API.csproj index 341dfd383..fbb1ad6aa 100644 --- a/src/Services/Payment/Payment.API/Payment.API.csproj +++ b/src/Services/Payment/Payment.API/Payment.API.csproj @@ -5,6 +5,7 @@ ..\..\..\..\docker-compose.dcproj $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false + true $(LangVersion) diff --git a/src/Services/Webhooks/Webhooks.API/Startup.cs b/src/Services/Webhooks/Webhooks.API/Startup.cs index cf501d46c..14781383d 100644 --- a/src/Services/Webhooks/Webhooks.API/Startup.cs +++ b/src/Services/Webhooks/Webhooks.API/Startup.cs @@ -62,6 +62,8 @@ namespace Webhooks.API .AddTransient() .AddTransient(); + services.AddControllers(); + var container = new ContainerBuilder(); container.Populate(services); return new AutofacServiceProvider(container.Build()); @@ -86,6 +88,7 @@ namespace Webhooks.API app.UseRouting(); app.UseEndpoints(endpoints => { + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/hc", new HealthCheckOptions() { Predicate = _ => true, @@ -95,8 +98,6 @@ namespace Webhooks.API { Predicate = r => r.Name.Contains("self") }); - - endpoints.MapDefaultControllerRoute(); }); app.UseSwagger() diff --git a/src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj b/src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj index ed474e741..7acf9d3ed 100644 --- a/src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj +++ b/src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj @@ -6,6 +6,7 @@ Linux $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false + true $(LangVersion) diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index db53a23b9..b250c365c 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -45,6 +45,8 @@ namespace Microsoft.eShopOnContainers.WebMVC .AddHttpClientServices(Configuration) //.AddHttpClientLogging(Configuration) //Opt-in HttpClientLogging config .AddCustomAuthentication(Configuration); + + services.AddControllers(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/Web/WebMVC/WebMVC.csproj b/src/Web/WebMVC/WebMVC.csproj index 25fc670fd..570dd7f87 100644 --- a/src/Web/WebMVC/WebMVC.csproj +++ b/src/Web/WebMVC/WebMVC.csproj @@ -6,6 +6,7 @@ ..\..\..\docker-compose.dcproj 3.0 false + true $(LangVersion) @@ -45,13 +46,13 @@ - + diff --git a/src/Web/WebSPA/Startup.cs b/src/Web/WebSPA/Startup.cs index 50e4dbef2..431ea5fbb 100644 --- a/src/Web/WebSPA/Startup.cs +++ b/src/Web/WebSPA/Startup.cs @@ -48,6 +48,8 @@ namespace eShopConContainers.WebSPA .AddUrlGroup(new Uri(Configuration["MarketingUrlHC"]), name: "marketingapigw-check", tags: new string[] { "marketingapigw" }) .AddUrlGroup(new Uri(Configuration["IdentityUrlHC"]), name: "identityapi-check", tags: new string[] { "identityapi" }); + services.AddControllers(); + services.Configure(Configuration); if (Configuration.GetValue("IsClusterEnv") == bool.TrueString) @@ -125,7 +127,6 @@ namespace eShopConContainers.WebSPA app.UseRouting(); app.UseEndpoints(endpoints => { - endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/liveness", new HealthCheckOptions { Predicate = r => r.Name.Contains("self") diff --git a/src/Web/WebSPA/WebSPA.csproj b/src/Web/WebSPA/WebSPA.csproj index f219dc5aa..caafa33af 100644 --- a/src/Web/WebSPA/WebSPA.csproj +++ b/src/Web/WebSPA/WebSPA.csproj @@ -5,6 +5,7 @@ aspnetcorespa-c23d27a4-eb88-4b18-9b77-2a93f3b15119 ..\..\..\docker-compose.dcproj false + true true wwwroot/dist/** $(DefaultItemExcludes);$(GeneratedItemPatterns) diff --git a/src/Web/WebStatus/Startup.cs b/src/Web/WebStatus/Startup.cs index eeabd0912..3dadeb842 100644 --- a/src/Web/WebStatus/Startup.cs +++ b/src/Web/WebStatus/Startup.cs @@ -23,6 +23,8 @@ namespace WebStatus { RegisterAppInsights(services); + services.AddControllers(); + services.AddOptions(); services.AddHealthChecks() .AddCheck("self", () => HealthCheckResult.Healthy()); @@ -67,7 +69,7 @@ namespace WebStatus app.UseRouting(); app.UseEndpoints(endpoints => { - endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); + endpoints.MapDefaultControllerRoute(); endpoints.MapHealthChecks("/liveness", new HealthCheckOptions { Predicate = r => r.Name.Contains("self") diff --git a/src/Web/WebStatus/WebStatus.csproj b/src/Web/WebStatus/WebStatus.csproj index 28f4bce18..0d32dded9 100644 --- a/src/Web/WebStatus/WebStatus.csproj +++ b/src/Web/WebStatus/WebStatus.csproj @@ -3,6 +3,7 @@ $(NetCoreTargetVersion) $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\docker-compose.dcproj + true $(LangVersion) diff --git a/src/Web/WebhookClient/Startup.cs b/src/Web/WebhookClient/Startup.cs index 3b56d20fb..f93f61a5f 100644 --- a/src/Web/WebhookClient/Startup.cs +++ b/src/Web/WebhookClient/Startup.cs @@ -26,8 +26,7 @@ namespace WebhookClient // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services - .AddSession(opt => + services.AddSession(opt => { opt.Cookie.Name = ".eShopWebhooks.Session"; }) @@ -36,7 +35,10 @@ namespace WebhookClient .AddCustomAuthentication(Configuration) .AddTransient() .AddSingleton() - .AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0); + .AddMvc() + .SetCompatibilityVersion(CompatibilityVersion.Version_3_0); + + services.AddControllers(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/Web/WebhookClient/WebhookClient.csproj b/src/Web/WebhookClient/WebhookClient.csproj index 22cb5afe2..7ec831b97 100644 --- a/src/Web/WebhookClient/WebhookClient.csproj +++ b/src/Web/WebhookClient/WebhookClient.csproj @@ -7,6 +7,7 @@ 36215d41-f31a-4aa6-9929-bd67d650e7b5 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false + true $(LangVersion) diff --git a/src/_build/dependencies.props b/src/_build/dependencies.props index df4140c77..a5f7c6459 100644 --- a/src/_build/dependencies.props +++ b/src/_build/dependencies.props @@ -48,29 +48,28 @@ 1.0.2 3.0.0-preview4-19123-01 3.0.0-alpha1-10670 - 3.0.0-preview6-19253-01 2.2.0-preview2-35157 3.0.0-alpha1-34847 - 3.0.0-preview6.19307.2 - 3.0.0-preview6.19307.2 + 3.0.0-preview7.19365.7 + 3.0.0-preview7.19365.7 2.2.0 1.0.0 2.2.0 3.0.0-preview6.19307.2 3.0.0-preview6.19307.2 - 3.0.0-preview6.19307.2 - 3.0.0-preview6-19253-01 + 3.0.0-preview7.19365.7 + 3.0.0-preview7.19365.7 3.0.0-preview4-19123-01 3.0.0-preview4-19123-01 7.5.0 3.0.0 4.5.0 - 4.7.0-preview6.19303.8 + 4.7.0-preview7.19362.9 3.0.0-preview6.19303.8 - 3.0.0-preview6.19304.10 - 3.0.0-preview6.19304.10 - 3.0.0-preview6.19304.10 - 3.0.0-preview6.19304.10 + 3.0.0-preview7.19362.6 + 3.0.0-preview7.19362.6 + 3.0.0-preview7.19362.6 + 3.0.0-preview7.19362.6 3.0.0-preview7.19365.7 2.2.0 2.2.0 @@ -78,7 +77,7 @@ 2.2.0 2.2.0 2.2.0 - 3.0.0-preview6.19304.6 + 3.0.0-preview7.19362.4 16.0.1 2.5.0 2.5.0