diff --git a/src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj b/src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj index d72d014b4..d3b1a049b 100644 --- a/src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj +++ b/src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj @@ -1,7 +1,7 @@ - + - netcoreapp2.0 + netcoreapp2.1 @@ -9,8 +9,7 @@ - + - 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 bd6d73950..198beaac2 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj @@ -1,7 +1,7 @@ - + - netcoreapp2.0 + netcoreapp2.1 Mobile.Shopping.HttpAggregator Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator ..\..\..\docker-compose.dcproj @@ -12,16 +12,9 @@ - + - - - - - - - - + diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile index ce6f1b155..d4940d436 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -1,12 +1,12 @@ -FROM microsoft/aspnetcore:2.0.5 AS base +FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base WORKDIR /app EXPOSE 80 -FROM microsoft/aspnetcore-build:2.0 AS build +FROM microsoft/dotnet:2.1-sdk AS build WORKDIR /src COPY . . -RUN dotnet restore -nowarn:msb3202,nu1503 WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator +RUN dotnet restore -nowarn:msb3202,nu1503 RUN dotnet build --no-restore -c Release -o /app FROM build AS publish diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Infrastructure/HttpClientAuthorizationDelegatingHandler.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Infrastructure/HttpClientAuthorizationDelegatingHandler.cs new file mode 100644 index 000000000..4e54829f8 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Infrastructure/HttpClientAuthorizationDelegatingHandler.cs @@ -0,0 +1,49 @@ +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Http; +using System.Collections.Generic; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure +{ + public class HttpClientAuthorizationDelegatingHandler + : DelegatingHandler + { + private readonly IHttpContextAccessor _httpContextAccesor; + + public HttpClientAuthorizationDelegatingHandler(IHttpContextAccessor httpContextAccesor) + { + _httpContextAccesor = httpContextAccesor; + } + + protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + var authorizationHeader = _httpContextAccesor.HttpContext + .Request.Headers["Authorization"]; + + if (!string.IsNullOrEmpty(authorizationHeader)) + { + request.Headers.Add("Authorization", new List() { authorizationHeader }); + } + + var token = await GetToken(); + + if (token != null) + { + request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token); + } + + return await base.SendAsync(request, cancellationToken); + } + + async Task GetToken() + { + const string ACCESS_TOKEN = "access_token"; + + return await _httpContextAccesor.HttpContext + .GetTokenAsync(ACCESS_TOKEN); + } + } +} diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs index 5ca89a408..291e98fd3 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs @@ -1,53 +1,39 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Http; -using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; -using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; -using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; +using System.Net.Http; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { public class BasketService : IBasketService { - private readonly IHttpClient _apiClient; + private readonly HttpClient _apiClient; private readonly ILogger _logger; private readonly UrlsConfig _urls; - private readonly IHttpContextAccessor _httpContextAccessor; - public BasketService(IHttpClient httpClient, IHttpContextAccessor httpContextAccessor, ILogger logger, IOptionsSnapshot config) + public BasketService(HttpClient httpClient,ILogger logger, IOptions config) { _apiClient = httpClient; _logger = logger; _urls = config.Value; - _httpContextAccessor = httpContextAccessor; } public async Task GetById(string id) { - var token = await GetUserTokenAsync(); - var data = await _apiClient.GetStringAsync(_urls.Basket + UrlsConfig.BasketOperations.GetItemById(id), token); + var data = await _apiClient.GetStringAsync(_urls.Basket + UrlsConfig.BasketOperations.GetItemById(id)); var basket = !string.IsNullOrEmpty(data) ? JsonConvert.DeserializeObject(data) : null; return basket; } public async Task Update(BasketData currentBasket) { - var token = await GetUserTokenAsync(); - var data = await _apiClient.PostAsync(_urls.Basket + UrlsConfig.BasketOperations.UpdateBasket(), currentBasket, token); - int i = 0; - } + var basketContent = new StringContent(JsonConvert.SerializeObject(currentBasket), System.Text.Encoding.UTF8, "application/json"); - async Task GetUserTokenAsync() - { - var context = _httpContextAccessor.HttpContext; - return await context.GetTokenAsync("access_token"); + var data = await _apiClient.PostAsync(_urls.Basket + UrlsConfig.BasketOperations.UpdateBasket(), basketContent); } } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs index 46d895f68..ba67b7c1e 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs @@ -1,43 +1,42 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; -using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; -using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; +using System.Collections.Generic; +using System.Net.Http; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { public class CatalogService : ICatalogService { - private readonly IHttpClient _apiClient; + private readonly HttpClient _httpClient; private readonly ILogger _logger; private readonly UrlsConfig _urls; - public CatalogService(IHttpClient httpClient, ILogger logger, IOptionsSnapshot config) + public CatalogService(HttpClient httpClient, ILogger logger, IOptions config) { - _apiClient = httpClient; + _httpClient = httpClient; _logger = logger; _urls = config.Value; } public async Task GetCatalogItem(int id) { - var data = await _apiClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemById(id)); - var item = JsonConvert.DeserializeObject(data); - return item; + var stringContent = await _httpClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemById(id)); + var catalogItem = JsonConvert.DeserializeObject(stringContent); + + return catalogItem; } public async Task> GetCatalogItems(IEnumerable ids) { - var data = await _apiClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemsById(ids)); - var item = JsonConvert.DeserializeObject(data); - return item; + var stringContent = await _httpClient.GetStringAsync(_urls.Catalog + UrlsConfig.CatalogOperations.GetItemsById(ids)); + var catalogItems = JsonConvert.DeserializeObject(stringContent); + return catalogItems; } } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs index 220e9afa9..d43e392d3 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderApiClient.cs @@ -1,24 +1,21 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; -using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; -using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; +using System.Net.Http; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { public class OrderApiClient : IOrderApiClient { - private readonly IHttpClient _apiClient; + private readonly HttpClient _apiClient; private readonly ILogger _logger; private readonly UrlsConfig _urls; - public OrderApiClient(IHttpClient httpClient, ILogger logger, IOptionsSnapshot config) + public OrderApiClient(HttpClient httpClient, ILogger logger, IOptions config) { _apiClient = httpClient; _logger = logger; @@ -28,10 +25,14 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services public async Task GetOrderDraftFromBasket(BasketData basket) { var url = _urls.Orders + UrlsConfig.OrdersOperations.GetOrderDraft(); - var response = await _apiClient.PostAsync(url, basket); + var content = new StringContent(JsonConvert.SerializeObject(basket), System.Text.Encoding.UTF8, "application/json"); + var response = await _apiClient.PostAsync(url, content); + response.EnsureSuccessStatusCode(); - var jsonResponse = await response.Content.ReadAsStringAsync(); - return JsonConvert.DeserializeObject(jsonResponse); + + var ordersDraftResponse = await response.Content.ReadAsStringAsync(); + + return JsonConvert.DeserializeObject(ordersDraftResponse); } } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs index 17f9f90e6..d9b3f7325 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs @@ -1,21 +1,22 @@ -using System; -using System.Collections.Generic; -using System.IdentityModel.Tokens.Jwt; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Filters.Basket.API.Infrastructure.Filters; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Polly; +using Polly.Extensions.Http; +using Polly.Timeout; using Swashbuckle.AspNetCore.Swagger; +using System; +using System.Collections.Generic; +using System.IdentityModel.Tokens.Jwt; +using System.Net.Http; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator { @@ -31,16 +32,79 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddSingleton(); - services.AddSingleton(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); + services.AddCustomMvc(Configuration) + .AddCustomAuthentication(Configuration) + .AddApplicationServices(); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) + { + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); + app.UsePathBase(pathBase); + } + + app.UseCors("CorsPolicy"); + + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseAuthentication(); + + app.UseMvc(); + + app.UseSwagger().UseSwaggerUI(c => + { + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1"); + //c.ConfigureOAuth2("Microsoft.eShopOnContainers.Web.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI"); + }); + + + } + } + + public static class ServiceCollectionExtensions + { + public static IServiceCollection AddCustomAuthentication(this IServiceCollection services, IConfiguration configuration) + { + JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); + var identityUrl = configuration.GetValue("urls:identity"); + services.AddAuthentication(options => + { + options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; + + }).AddJwtBearer(options => + { + options.Authority = identityUrl; + options.RequireHttpsMetadata = false; + options.Audience = "webshoppingagg"; + options.Events = new JwtBearerEvents() + { + OnAuthenticationFailed = async ctx => + { + int i = 0; + }, + OnTokenValidated = async ctx => + { + int i = 0; + } + }; + }); + return services; + } + public static IServiceCollection AddCustomMvc(this IServiceCollection services, IConfiguration configuration) + { services.AddOptions(); - services.Configure(Configuration.GetSection("urls")); + services.Configure(configuration.GetSection("urls")); - services.AddMvc(); + services.AddMvc().SetCompatibilityVersion(AspNetCore.Mvc.CompatibilityVersion.Version_2_1); services.AddSwaggerGen(options => { @@ -57,8 +121,8 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator { Type = "oauth2", Flow = "implicit", - AuthorizationUrl = $"{Configuration.GetValue("IdentityUrlExternal")}/connect/authorize", - TokenUrl = $"{Configuration.GetValue("IdentityUrlExternal")}/connect/token", + AuthorizationUrl = $"{configuration.GetValue("IdentityUrlExternal")}/connect/authorize", + TokenUrl = $"{configuration.GetValue("IdentityUrlExternal")}/connect/token", Scopes = new Dictionary() { { "webshoppingagg", "Shopping Aggregator for Web Clients" } @@ -77,62 +141,47 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator .AllowCredentials()); }); - - JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); - var identityUrl = Configuration.GetValue("urls:identity"); - services.AddAuthentication(options => - { - options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - - }).AddJwtBearer(options => - { - options.Authority = identityUrl; - options.RequireHttpsMetadata = false; - options.Audience = "webshoppingagg"; - options.Events = new JwtBearerEvents() - { - OnAuthenticationFailed = async ctx => - { - int i = 0; - }, - OnTokenValidated = async ctx => - { - int i = 0; - } - }; - }); + return services; } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) + public static IServiceCollection AddApplicationServices(this IServiceCollection services) { + //register delegating handlers + services.AddTransient(); + services.AddSingleton(); - var pathBase = Configuration["PATH_BASE"]; - if (!string.IsNullOrEmpty(pathBase)) - { - loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); - app.UsePathBase(pathBase); - } - - app.UseCors("CorsPolicy"); + //register http services + + services.AddHttpClient() + .AddHttpMessageHandler() + .AddPolicyHandler(GetRetryPolicy()) + .AddPolicyHandler(GetCircuitBreakerPolicy()); - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } + services.AddHttpClient() + .AddPolicyHandler(GetRetryPolicy()) + .AddPolicyHandler(GetCircuitBreakerPolicy()); - app.UseAuthentication(); + services.AddHttpClient() + .AddHttpMessageHandler() + .AddPolicyHandler(GetRetryPolicy()) + .AddPolicyHandler(GetCircuitBreakerPolicy()); - app.UseMvc(); - app.UseSwagger().UseSwaggerUI(c => - { - c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1"); - c.ConfigureOAuth2("Microsoft.eShopOnContainers.Web.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI"); - }); + return services; + } + static IAsyncPolicy GetRetryPolicy() + { + return HttpPolicyExtensions + .HandleTransientHttpError() + .OrResult(msg => msg.StatusCode == System.Net.HttpStatusCode.NotFound) + .WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt))); } + static IAsyncPolicy GetCircuitBreakerPolicy() + { + return HttpPolicyExtensions + .HandleTransientHttpError() + .CircuitBreakerAsync(5, TimeSpan.FromSeconds(30)); + } } } 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 0b6dbf44b..fb1f75d1b 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj @@ -1,7 +1,7 @@ - + - netcoreapp2.0 + netcoreapp2.1 Web.Shopping.HttpAggregator Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator ..\..\..\docker-compose.dcproj @@ -12,16 +12,10 @@ - - - - - - - - - - + + + + diff --git a/src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json b/src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json index b10e78982..b3e01d773 100644 --- a/src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json +++ b/src/ApiGateways/Web.Bff.Shopping/apigw/configuration.json @@ -108,18 +108,6 @@ "UpstreamPathTemplate": "/catalog-api/{everything}", "UpstreamHttpMethod": [] }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "marketing.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/marketing-api/{everything}", - "UpstreamHttpMethod": [] - }, { "DownstreamPathTemplate": "/{everything}", "DownstreamScheme": "http", @@ -131,18 +119,6 @@ ], "UpstreamPathTemplate": "/payment-api/{everything}", "UpstreamHttpMethod": [] - }, - { - "DownstreamPathTemplate": "/{everything}", - "DownstreamScheme": "http", - "DownstreamHostAndPorts": [ - { - "Host": "locations.api", - "Port": 80 - } - ], - "UpstreamPathTemplate": "/location-api/{everything}", - "UpstreamHttpMethod": [] } ], diff --git a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj index b219dcfa1..9704f6ff5 100644 --- a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj index d6c9fc8e2..a4e1a5b47 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj @@ -6,13 +6,13 @@ - - - - - + + + + + - + diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj index 8e76a02db..d7c463509 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj @@ -1,19 +1,19 @@  - - netstandard2.0 - Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus - + + netstandard2.0 + Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus + - - - - - - + + + + + + - - - + + + \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj index d4f380a14..dc2137523 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj @@ -6,18 +6,12 @@ - - - - - - - - - - - - + + + + + + diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj index 5018e198c..4fb000ed5 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj @@ -1,19 +1,19 @@  - - netstandard2.0 - + + netstandard2.0 + - - - + + + - - - + + + - - - + + + \ No newline at end of file diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj index 007f66f65..201e86306 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj @@ -16,10 +16,10 @@ - + - + diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj index 0aef3c907..6217f6069 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj index 6c102c33d..e70d584d0 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj @@ -1,20 +1,20 @@  - - netstandard2.0 - + + netstandard2.0 + - - - + + + - - - - - - - - + + + + + + + + diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/IHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/IHttpClient.cs deleted file mode 100644 index 5ea3003ed..000000000 --- a/src/BuildingBlocks/Resilience/Resilience.Http/IHttpClient.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Net.Http; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http -{ - public interface IHttpClient - { - Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer"); - - Task PostAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer"); - - Task DeleteAsync(string uri, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer"); - - Task PutAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer"); - } -} diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj b/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj deleted file mode 100644 index 276c1a23f..000000000 --- a/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netstandard2.0 - Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http - - - - - - - - - - \ No newline at end of file diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs deleted file mode 100644 index 9fa38ee8d..000000000 --- a/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs +++ /dev/null @@ -1,191 +0,0 @@ -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using Polly; -using Polly.Wrap; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; - -namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http -{ - /// - /// HttpClient wrapper that integrates Retry and Circuit - /// breaker policies when invoking HTTP services. - /// Based on Polly library: https://github.com/App-vNext/Polly - /// - public class ResilientHttpClient : IHttpClient - { - private readonly HttpClient _client; - private readonly ILogger _logger; - private readonly Func> _policyCreator; - private ConcurrentDictionary _policyWrappers; - private readonly IHttpContextAccessor _httpContextAccessor; - - public ResilientHttpClient(Func> policyCreator, ILogger logger, IHttpContextAccessor httpContextAccessor) - { - _client = new HttpClient(); - _logger = logger; - _policyCreator = policyCreator; - _policyWrappers = new ConcurrentDictionary(); - _httpContextAccessor = httpContextAccessor; - } - - - public Task PostAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - return DoPostPutAsync(HttpMethod.Post, uri, item, authorizationToken, requestId, authorizationMethod); - } - - public Task PutAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - return DoPostPutAsync(HttpMethod.Put, uri, item, authorizationToken, requestId, authorizationMethod); - } - - public Task DeleteAsync(string uri, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - var origin = GetOriginFromUri(uri); - - return HttpInvoker(origin, async () => - { - var requestMessage = new HttpRequestMessage(HttpMethod.Delete, uri); - - SetAuthorizationHeader(requestMessage); - - if (authorizationToken != null) - { - requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } - - if (requestId != null) - { - requestMessage.Headers.Add("x-requestid", requestId); - } - - return await _client.SendAsync(requestMessage); - }); - } - - - public Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer") - { - var origin = GetOriginFromUri(uri); - - return HttpInvoker(origin, async () => - { - var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); - - SetAuthorizationHeader(requestMessage); - - if (authorizationToken != null) - { - requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } - - var response = await _client.SendAsync(requestMessage); - - // raise exception if HttpResponseCode 500 - // needed for circuit breaker to track fails - - if (response.StatusCode == HttpStatusCode.InternalServerError) - { - throw new HttpRequestException(); - } - - if (!response.IsSuccessStatusCode) - { - return null; - } - - return await response.Content.ReadAsStringAsync(); - }); - } - - private Task DoPostPutAsync(HttpMethod method, string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - if (method != HttpMethod.Post && method != HttpMethod.Put) - { - throw new ArgumentException("Value must be either post or put.", nameof(method)); - } - - // a new StringContent must be created for each retry - // as it is disposed after each call - var origin = GetOriginFromUri(uri); - - return HttpInvoker(origin, async () => - { - var requestMessage = new HttpRequestMessage(method, uri); - - SetAuthorizationHeader(requestMessage); - - requestMessage.Content = new StringContent(JsonConvert.SerializeObject(item), System.Text.Encoding.UTF8, "application/json"); - - if (authorizationToken != null) - { - requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } - - if (requestId != null) - { - requestMessage.Headers.Add("x-requestid", requestId); - } - - var response = await _client.SendAsync(requestMessage); - - // raise exception if HttpResponseCode 500 - // needed for circuit breaker to track fails - - if (response.StatusCode == HttpStatusCode.InternalServerError) - { - throw new HttpRequestException(); - } - - return response; - }); - } - - private async Task HttpInvoker(string origin, Func> action) - { - var normalizedOrigin = NormalizeOrigin(origin); - - if (!_policyWrappers.TryGetValue(normalizedOrigin, out PolicyWrap policyWrap)) - { - policyWrap = Policy.WrapAsync(_policyCreator(normalizedOrigin).ToArray()); - _policyWrappers.TryAdd(normalizedOrigin, policyWrap); - } - - // Executes the action applying all - // the policies defined in the wrapper - return await policyWrap.ExecuteAsync(action, new Context(normalizedOrigin)); - } - - - private static string NormalizeOrigin(string origin) - { - return origin?.Trim()?.ToLower(); - } - - private static string GetOriginFromUri(string uri) - { - var url = new Uri(uri); - - var origin = $"{url.Scheme}://{url.DnsSafeHost}:{url.Port}"; - - return origin; - } - - private void SetAuthorizationHeader(HttpRequestMessage requestMessage) - { - var authorizationHeader = _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; - if (!string.IsNullOrEmpty(authorizationHeader)) - { - requestMessage.Headers.Add("Authorization", new List() { authorizationHeader }); - } - } - } -} diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs deleted file mode 100644 index 578168bff..000000000 --- a/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs +++ /dev/null @@ -1,125 +0,0 @@ -using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http -{ - public class StandardHttpClient : IHttpClient - { - private HttpClient _client; - private ILogger _logger; - private readonly IHttpContextAccessor _httpContextAccessor; - - public StandardHttpClient(ILogger logger, IHttpContextAccessor httpContextAccessor) - { - _client = new HttpClient(); - _logger = logger; - _httpContextAccessor = httpContextAccessor; - } - - public async Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer") - { - var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); - - SetAuthorizationHeader(requestMessage); - - if (authorizationToken != null) - { - requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } - - var response = await _client.SendAsync(requestMessage); - - if (!response.IsSuccessStatusCode) - { - return null; - } - - return await response.Content.ReadAsStringAsync(); - } - - private async Task DoPostPutAsync(HttpMethod method, string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - if (method != HttpMethod.Post && method != HttpMethod.Put) - { - throw new ArgumentException("Value must be either post or put.", nameof(method)); - } - - // a new StringContent must be created for each retry - // as it is disposed after each call - - var requestMessage = new HttpRequestMessage(method, uri); - - SetAuthorizationHeader(requestMessage); - - requestMessage.Content = new StringContent(JsonConvert.SerializeObject(item), System.Text.Encoding.UTF8, "application/json"); - - if (authorizationToken != null) - { - requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } - - if (requestId != null) - { - requestMessage.Headers.Add("x-requestid", requestId); - } - - var response = await _client.SendAsync(requestMessage); - - // raise exception if HttpResponseCode 500 - // needed for circuit breaker to track fails - - if (response.StatusCode == HttpStatusCode.InternalServerError) - { - throw new HttpRequestException(); - } - - return response; - } - - - public async Task PostAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - return await DoPostPutAsync(HttpMethod.Post, uri, item, authorizationToken, requestId, authorizationMethod); - } - - public async Task PutAsync(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - return await DoPostPutAsync(HttpMethod.Put, uri, item, authorizationToken, requestId, authorizationMethod); - } - public async Task DeleteAsync(string uri, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer") - { - var requestMessage = new HttpRequestMessage(HttpMethod.Delete, uri); - - SetAuthorizationHeader(requestMessage); - - if (authorizationToken != null) - { - requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } - - if (requestId != null) - { - requestMessage.Headers.Add("x-requestid", requestId); - } - - return await _client.SendAsync(requestMessage); - } - - private void SetAuthorizationHeader(HttpRequestMessage requestMessage) - { - var authorizationHeader = _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; - if (!string.IsNullOrEmpty(authorizationHeader)) - { - requestMessage.Headers.Add("Authorization", new List() { authorizationHeader }); - } - } - } -} - diff --git a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj index 6a6632379..10b0f3c21 100644 --- a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj +++ b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj @@ -1,12 +1,12 @@ - + - netcoreapp2.0 + netcoreapp2.1 - - + + diff --git a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs index 858506e46..ef80f77cf 100644 --- a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs +++ b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs @@ -27,9 +27,9 @@ namespace Microsoft.AspNetCore.Hosting var retry = Policy.Handle() .WaitAndRetry(new TimeSpan[] { + TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(5), - TimeSpan.FromSeconds(10), - TimeSpan.FromSeconds(15), + TimeSpan.FromSeconds(8), }); retry.Execute(() => diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index 3bc5cee4c..85bef7d87 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -1,33 +1,35 @@  - - netcoreapp2.0 - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - ..\..\..\..\docker-compose.dcproj - + + netcoreapp2.1 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + ..\..\..\..\docker-compose.dcproj + - - - PreserveNewest - - + + + PreserveNewest + + - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index ad36cf3b7..890b23273 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.1 portable true Catalog.API @@ -34,20 +34,17 @@ - - - - - - - + + + + + + + + - - - - diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj index 84a87a231..bf1952a23 100644 --- a/src/Services/Identity/Identity.API/Identity.API.csproj +++ b/src/Services/Identity/Identity.API/Identity.API.csproj @@ -1,62 +1,59 @@  - - netcoreapp2.0 - 2.0.0 - aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5 - ..\..\..\..\docker-compose.dcproj - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - + + netcoreapp2.1 + aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5 + ..\..\..\..\docker-compose.dcproj + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + diff --git a/src/Services/Location/Locations.API/Locations.API.csproj b/src/Services/Location/Locations.API/Locations.API.csproj index aef0fe9e9..58e2c9b47 100644 --- a/src/Services/Location/Locations.API/Locations.API.csproj +++ b/src/Services/Location/Locations.API/Locations.API.csproj @@ -1,26 +1,24 @@  - netcoreapp2.0 + netcoreapp2.1 ..\..\..\..\docker-compose.dcproj aspnet-Locations.API-20161122013619 - - - - - - + + + + + + + - - - - - + + diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj index 36da8fceb..9e12357d4 100644 --- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj +++ b/src/Services/Marketing/Marketing.API/Marketing.API.csproj @@ -1,56 +1,54 @@  - - netcoreapp2.0 - ..\..\..\..\docker-compose.dcproj - Microsoft.eShopOnContainers.Services.Marketing.API - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - aspnet-Marketing.API-20161122013619 - - /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights - /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights - + + netcoreapp2.1 + ..\..\..\..\docker-compose.dcproj + Microsoft.eShopOnContainers.Services.Marketing.API + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + aspnet-Marketing.API-20161122013619 + + /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights + /subscriptions/6c22bb55-0221-4ce4-9bf1-3c4a10a7294c/resourcegroups/eshop-log/providers/microsoft.insights/components/eshopappinsights + - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + - - - PreserveNewest - - + + + PreserveNewest + + - - - + + + diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj index c95cff6e1..3c88b6f96 100644 --- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj +++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.1 aspnet-Ordering.API-20161122013547 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj @@ -30,26 +30,22 @@ + + - - - - - - - - - + + + + + + + + + + - - - - - - - + - PreserveNewest diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj b/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj index f2a7ad465..786b53be5 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj @@ -1,23 +1,22 @@ - + - netcoreapp2.0 + netcoreapp2.1 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj - + + + + - + - - - - - + diff --git a/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj b/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj index e4731db13..08c30bb9d 100644 --- a/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj +++ b/src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj b/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj index 8b8aa5832..c93076ca6 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj +++ b/src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj @@ -1,26 +1,31 @@ - + - - netcoreapp2.0 - ..\..\..\..\docker-compose.dcproj - + + netcoreapp2.1 + ..\..\..\..\docker-compose.dcproj + - - - + + + - - - - - - - + + + + + + + + + + + + - - - - - + + + + + diff --git a/src/Services/Payment/Payment.API/Payment.API.csproj b/src/Services/Payment/Payment.API/Payment.API.csproj index 278dcc6cb..135ea6f58 100644 --- a/src/Services/Payment/Payment.API/Payment.API.csproj +++ b/src/Services/Payment/Payment.API/Payment.API.csproj @@ -1,30 +1,28 @@  - - netcoreapp2.0 - ..\..\..\..\docker-compose.dcproj - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - + + netcoreapp2.1 + ..\..\..\..\docker-compose.dcproj + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/Web/WebMVC/WebMVC.csproj b/src/Web/WebMVC/WebMVC.csproj index 0160c9132..e1f61446b 100644 --- a/src/Web/WebMVC/WebMVC.csproj +++ b/src/Web/WebMVC/WebMVC.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0 + netcoreapp2.1 aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3 ..\..\..\docker-compose.dcproj @@ -18,14 +18,16 @@ - - - - - - - - + + + + + + + + + + @@ -33,16 +35,9 @@ - - - - - - - diff --git a/src/Web/WebMVC/bower.json b/src/Web/WebMVC/bower.json index f6d44b1c0..fd0916512 100644 --- a/src/Web/WebMVC/bower.json +++ b/src/Web/WebMVC/bower.json @@ -1,10 +1,10 @@ { - "name": "asp.net", - "private": true, - "dependencies": { - "bootstrap": "v3.3.7", - "jquery": "2.2.0", - "jquery-validation": "1.14.0", - "jquery-validation-unobtrusive": "3.2.6" - } + "dependencies": { + "bootstrap": "v3.3.7", + "jquery": "2.2.0", + "jquery-validation": "1.14.0", + "jquery-validation-unobtrusive": "3.2.6" + }, + "name": "asp.net", + "private": true } diff --git a/src/Web/WebSPA/WebSPA.csproj b/src/Web/WebSPA/WebSPA.csproj index f34177d65..1390b7bcf 100644 --- a/src/Web/WebSPA/WebSPA.csproj +++ b/src/Web/WebSPA/WebSPA.csproj @@ -1,13 +1,14 @@  - netcoreapp2.0 + netcoreapp2.1 aspnetcorespa-c23d27a4-eb88-4b18-9b77-2a93f3b15119 ..\..\..\docker-compose.dcproj false true wwwroot/dist/** $(DefaultItemExcludes);$(GeneratedItemPatterns) + 2.8 @@ -84,13 +85,14 @@ - - - - - - - + + + + + + + + @@ -103,11 +105,6 @@ - - - - - - + @@ -187,6 +184,8 @@ - + + + diff --git a/src/Web/WebStatus/WebStatus.csproj b/src/Web/WebStatus/WebStatus.csproj index e31928fe2..35b37a756 100644 --- a/src/Web/WebStatus/WebStatus.csproj +++ b/src/Web/WebStatus/WebStatus.csproj @@ -1,19 +1,18 @@  - netcoreapp2.0 + netcoreapp2.1 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\docker-compose.dcproj - - - - - - - - + + + + + + +