a. Project files
1. Specified RuntimeFrameworkVersion to 2.1.3 2. Specified Microsoft.AspNetCore.App meta package version to 2.1.3 3. Updated NuGetPackages to support ASP.NET Core 2.1.3 i. Microsoft.AspNetCore.Hosting 2.1.0->2.1.1 ii. Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.Relational, Microsoft.EntityFrameworkCore.SqlServer 2.1.0->2.1.2 iii.Microsoft.Extensions.Logging 2.1.0->2.1.1 iv. Microsoft.ApplicationInsights.AspNetCore 2.2.1->2.4.1 v. Microsoft.ApplicationInsights.DependencyCollector 2.6.1-> 2.7.2 vi. Microsoft.ApplicationInsights.ServiceFabric 2.1.1-beta1->2.1.1 vii. Microsoft.Extensions.Logging.AzureAppServices 2.1.0-> 2.1.1 viii. Microsoft.AspNetCore.App 2.1.0->2.1.3 ix. Microsoft.VisualStudio.Azure.Fabric.MSBuild 1.6.5->1.6.7 x. Microsoft.AspNetCore.SignalR, Microsoft.AspNetCore.SignalR.Core, Microsoft.AspNetCore.SignalR.Redis 1.0.0->1.0.3 4. Updated NuGetPackages i. System.Threading.Tasks.Extensions 4.5.0->4.5.1 ii. WindowsAzure.Storage 9.1.0->9.3.1 b. DockerFile 1. Updated SDK version to 2.1.401 2. Updated Runtime version to 2.1.3 c. Startup.cs file 1. SetCompatibilityVersion to 2.1 in MVC pipeline (Line 83) 2. Suppress compiler warning 3. Re-factored coding styles d. appsettings.json 1. Updated IdentityUrl to use HTTPS endpoint e. launchsettings.json 1. Used 64bit IIS Express bitness
This commit is contained in:
parent
7d56cd2b73
commit
e23e8c641e
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
|
||||
RUN dotnet restore src/ApiGateways/ApiGw-Base/
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -9,7 +10,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Ocelot" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -13,7 +13,8 @@
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"OcelotApiGw": {
|
||||
"commandName": "Project",
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName>
|
||||
<RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
@ -12,9 +13,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"PurchaseForMvc": {
|
||||
"commandName": "Project",
|
||||
|
@ -31,15 +31,20 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddCustomMvc(Configuration)
|
||||
services
|
||||
.AddCustomMvc(Configuration)
|
||||
.AddCustomAuthentication(Configuration)
|
||||
.AddHttpServices();
|
||||
//services.AddHttpsRedirection(opts =>
|
||||
//{
|
||||
// opts.HttpsPort = 4120;
|
||||
//});
|
||||
}
|
||||
|
||||
// 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"];
|
||||
string pathBase = Configuration["PATH_BASE"];
|
||||
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
@ -73,7 +78,10 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||
services.AddOptions();
|
||||
services.Configure<UrlsConfig>(configuration.GetSection("urls"));
|
||||
|
||||
services.AddMvc();
|
||||
services
|
||||
.AddMvc()
|
||||
.SetCompatibilityVersion(AspNetCore.Mvc.CompatibilityVersion.Version_2_1)
|
||||
;
|
||||
|
||||
services.AddSwaggerGen(options =>
|
||||
{
|
||||
@ -128,13 +136,15 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
||||
options.Audience = "mobileshoppingagg";
|
||||
options.Events = new JwtBearerEvents()
|
||||
{
|
||||
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
OnAuthenticationFailed = async ctx =>
|
||||
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
{
|
||||
int i = 0;
|
||||
},
|
||||
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
OnTokenValidated = async ctx =>
|
||||
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
{
|
||||
int i = 0;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"PurchaseForMvc": {
|
||||
"commandName": "Project",
|
||||
|
@ -11,7 +11,6 @@ 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;
|
||||
@ -32,7 +31,8 @@ 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.AddCustomMvc(Configuration)
|
||||
services
|
||||
.AddCustomMvc(Configuration)
|
||||
.AddCustomAuthentication(Configuration)
|
||||
.AddApplicationServices();
|
||||
}
|
||||
@ -53,7 +53,6 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseAuthentication();
|
||||
|
||||
app.UseMvc();
|
||||
@ -73,26 +72,29 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||
public static IServiceCollection AddCustomAuthentication(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
|
||||
var identityUrl = configuration.GetValue<string>("urls:identity");
|
||||
string identityUrl = configuration.GetValue<string>("urls:identity");
|
||||
services.AddAuthentication(options =>
|
||||
{
|
||||
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||
|
||||
}).AddJwtBearer(options =>
|
||||
})
|
||||
.AddJwtBearer(options =>
|
||||
{
|
||||
options.Authority = identityUrl;
|
||||
options.RequireHttpsMetadata = false;
|
||||
options.Audience = "webshoppingagg";
|
||||
options.Events = new JwtBearerEvents()
|
||||
{
|
||||
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
OnAuthenticationFailed = async ctx =>
|
||||
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
{
|
||||
int i = 0;
|
||||
},
|
||||
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
OnTokenValidated = async ctx =>
|
||||
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
|
||||
{
|
||||
int i = 0;
|
||||
}
|
||||
};
|
||||
});
|
||||
@ -104,12 +106,15 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||
services.AddOptions();
|
||||
services.Configure<UrlsConfig>(configuration.GetSection("urls"));
|
||||
|
||||
services.AddMvc();
|
||||
services
|
||||
.AddMvc()
|
||||
.SetCompatibilityVersion(AspNetCore.Mvc.CompatibilityVersion.Version_2_1)
|
||||
;
|
||||
|
||||
services.AddSwaggerGen(options =>
|
||||
{
|
||||
options.DescribeAllEnumsAsStrings();
|
||||
options.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info
|
||||
options.SwaggerDoc("v1", new Info
|
||||
{
|
||||
Title = "Shopping Aggregator for Web Clients",
|
||||
Version = "v1",
|
||||
@ -134,8 +139,12 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||
|
||||
services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("CorsPolicy",
|
||||
builder => builder.AllowAnyOrigin()
|
||||
options
|
||||
.AddPolicy(
|
||||
"CorsPolicy",
|
||||
builder =>
|
||||
builder
|
||||
.AllowAnyOrigin()
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials());
|
||||
@ -147,7 +156,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
||||
{
|
||||
//register delegating handlers
|
||||
services.AddTransient<HttpClientAuthorizationDelegatingHandler>();
|
||||
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
services.AddHttpContextAccessor();
|
||||
|
||||
//register http services
|
||||
|
||||
|
@ -2,9 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<AssemblyName>Web.Shopping.HttpAggregator</AssemblyName>
|
||||
<RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<UserSecretsId>0890cb23-79b5-408d-9aeb-13e6ff218d71</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -12,10 +14,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="2.4.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -6,10 +6,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -13,7 +13,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -16,11 +16,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.1" />
|
||||
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.0" />
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="9.1.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />
|
||||
<PackageReference Include="WindowsAzure.Storage" Version="9.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -9,12 +9,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Polly" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
@ -13,14 +14,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta9" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="StackExchange.Redis.StrongName" Version="1.2.4" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
|
||||
</ItemGroup>
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Basket/Basket.API
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Microsoft.eShopOnContainers.Services.Basket.API": {
|
||||
"commandName": "Project",
|
||||
|
@ -54,8 +54,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
{
|
||||
options.Filters.Add(typeof(HttpGlobalExceptionFilter));
|
||||
options.Filters.Add(typeof(ValidateModelStateFilter));
|
||||
|
||||
}).AddControllersAsServices();
|
||||
})
|
||||
.AddControllersAsServices()
|
||||
.SetCompatibilityVersion(AspNetCore.Mvc.CompatibilityVersion.Version_2_1)
|
||||
;
|
||||
|
||||
ConfigureAuthService(services);
|
||||
|
||||
@ -74,7 +76,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
//and then creating the connection it seems reasonable to move
|
||||
//that cost to startup instead of having the first request pay the
|
||||
//penalty.
|
||||
services.AddSingleton<ConnectionMultiplexer>(sp =>
|
||||
services.AddSingleton(sp =>
|
||||
{
|
||||
var settings = sp.GetRequiredService<IOptions<BasketSettings>>().Value;
|
||||
var configuration = ConfigurationOptions.Parse(settings.ConnectionString, true);
|
||||
|
@ -7,7 +7,7 @@
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"IdentityUrl": "http://localhost:5105",
|
||||
"IdentityUrl": "https://localhost:4105",
|
||||
"ConnectionString": "127.0.0.1",
|
||||
"AzureServiceBusEnabled": false,
|
||||
"SubscriptionClientName": "Basket",
|
||||
|
@ -35,13 +35,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
|
||||
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Catalog/Catalog.API
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "/swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Microsoft.eShopOnContainers.Services.Catalog.API": {
|
||||
"commandName": "Project",
|
||||
|
@ -124,7 +124,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
|
||||
services.AddHealthChecks(checks =>
|
||||
{
|
||||
var minutes = 1;
|
||||
if (int.TryParse(configuration["HealthCheck:Timeout"], out var minutesParsed))
|
||||
if (int.TryParse(configuration["HealthCheck:Timeout"], out int minutesParsed))
|
||||
{
|
||||
minutes = minutesParsed;
|
||||
}
|
||||
@ -141,7 +141,10 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
|
||||
services.AddMvc(options =>
|
||||
{
|
||||
options.Filters.Add(typeof(HttpGlobalExceptionFilter));
|
||||
}).AddControllersAsServices();
|
||||
})
|
||||
.AddControllersAsServices()
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
|
||||
;
|
||||
|
||||
services.AddCors(options =>
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Location/Locations.API
|
||||
|
@ -2,18 +2,19 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<UserSecretsId>aspnet-Locations.API-20161122013619</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta9" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="mongocsharpdriver" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.5.0" />
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Marketing/Marketing.API
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<RootNamespace>Microsoft.eShopOnContainers.Services.Marketing.API</RootNamespace>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
@ -21,13 +22,13 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta9" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="mongocsharpdriver" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.5.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.5.0" />
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Marketing.API": {
|
||||
"commandName": "Project",
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.API
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<UserSecretsId>aspnet-Ordering.API-20161122013547</UserSecretsId>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
@ -30,22 +31,22 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentValidation.AspNetCore" Version="7.5.0" />
|
||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="4.1.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Dapper" Version="1.50.4" />
|
||||
<PackageReference Include="FluentValidation.AspNetCore" Version="7.5.0" />
|
||||
<PackageReference Include="MediatR" Version="4.1.0" />
|
||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="4.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta9" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="Polly" Version="6.0.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
|
||||
<PackageReference Include="System.Reflection" Version="4.3.0" />
|
||||
<PackageReference Include="Dapper" Version="1.50.4" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
<PackageReference Include="Polly" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Setup\*">
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "/swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Microsoft.eShopOnContainers.Services.Ordering.API": {
|
||||
"commandName": "Project",
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
@ -16,7 +17,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Dapper" Version="1.50.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Ordering.BackgroundTasks": {
|
||||
"commandName": "Project",
|
||||
|
@ -9,9 +9,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -11,15 +12,15 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Core" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Redis" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Core" Version="1.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Redis" Version="1.0.3" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta9" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -13,7 +13,8 @@
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Ordering.SignalrHub": {
|
||||
"commandName": "Project",
|
||||
|
@ -1,8 +1,8 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Payment/Payment.API
|
||||
|
@ -2,18 +2,19 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta9" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
||||
|
@ -14,7 +14,8 @@
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"Payment.API": {
|
||||
"commandName": "Project",
|
||||
|
@ -1,12 +1,13 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/dotnet:2.1.401-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Web/WebStatus
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
COPY src/Web/WebMVC/synergydev.pfx /root/.aspnet/https/
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -13,7 +13,8 @@
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"use64Bit": true
|
||||
},
|
||||
"WebStatus": {
|
||||
"commandName": "Project",
|
||||
|
@ -1,15 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.ApplicationInsights.Extensibility;
|
||||
using Microsoft.ApplicationInsights.ServiceFabric;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using WebStatus.Extensions;
|
||||
using Microsoft.ApplicationInsights.Extensibility;
|
||||
using Microsoft.ApplicationInsights.ServiceFabric;
|
||||
|
||||
using TimeSpan = System.TimeSpan;
|
||||
|
||||
namespace WebStatus
|
||||
{
|
||||
@ -33,7 +31,7 @@ namespace WebStatus
|
||||
services.AddHealthChecks(checks =>
|
||||
{
|
||||
var minutes = 1;
|
||||
if (int.TryParse(Configuration["HealthCheck:Timeout"], out var minutesParsed))
|
||||
if (int.TryParse(Configuration["HealthCheck:Timeout"], out int minutesParsed))
|
||||
{
|
||||
minutes = minutesParsed;
|
||||
}
|
||||
@ -50,7 +48,10 @@ namespace WebStatus
|
||||
checks.AddUrlCheckIfNotNull(Configuration["spa"], TimeSpan.Zero); //No cache for this HealthCheck, better just for demos
|
||||
});
|
||||
|
||||
services.AddMvc();
|
||||
services
|
||||
.AddMvc()
|
||||
.SetCompatibilityVersion(Microsoft.AspNetCore.Mvc.CompatibilityVersion.Version_2_1)
|
||||
;
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
@ -1,16 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>2.1.3</RuntimeFrameworkVersion>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta8" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1-beta1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
|
||||
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="1.0.113" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user