Replace obsolete IHostingEnvironment for IWebHostEnvironment
This commit is contained in:
parent
69de1a30f3
commit
0c14810a33
@ -12,6 +12,7 @@ using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using System;
|
using System;
|
||||||
@ -49,7 +50,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// 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 void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
var pathBase = Configuration["PATH_BASE"];
|
var pathBase = Configuration["PATH_BASE"];
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using System;
|
using System;
|
||||||
@ -50,7 +51,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// 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 void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
var pathBase = Configuration["PATH_BASE"];
|
var pathBase = Configuration["PATH_BASE"];
|
||||||
if (!string.IsNullOrEmpty(pathBase))
|
if (!string.IsNullOrEmpty(pathBase))
|
||||||
|
@ -20,7 +20,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Data
|
|||||||
{
|
{
|
||||||
private readonly IPasswordHasher<ApplicationUser> _passwordHasher = new PasswordHasher<ApplicationUser>();
|
private readonly IPasswordHasher<ApplicationUser> _passwordHasher = new PasswordHasher<ApplicationUser>();
|
||||||
|
|
||||||
public async Task SeedAsync(ApplicationDbContext context,IHostingEnvironment env,
|
public async Task SeedAsync(ApplicationDbContext context,IWebHostEnvironment env,
|
||||||
ILogger<ApplicationDbContextSeed> logger, IOptions<AppSettings> settings,int? retry = 0)
|
ILogger<ApplicationDbContextSeed> logger, IOptions<AppSettings> settings,int? retry = 0)
|
||||||
{
|
{
|
||||||
int retryForAvaiability = retry.Value;
|
int retryForAvaiability = retry.Value;
|
||||||
|
@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.eShopOnContainers.Services.Identity.API.Data;
|
using Microsoft.eShopOnContainers.Services.Identity.API.Data;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@ -32,7 +33,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
|||||||
host.MigrateDbContext<PersistedGrantDbContext>((_, __) => { })
|
host.MigrateDbContext<PersistedGrantDbContext>((_, __) => { })
|
||||||
.MigrateDbContext<ApplicationDbContext>((context, services) =>
|
.MigrateDbContext<ApplicationDbContext>((context, services) =>
|
||||||
{
|
{
|
||||||
var env = services.GetService<IHostingEnvironment>();
|
var env = services.GetService<IWebHostEnvironment>();
|
||||||
var logger = services.GetService<ILogger<ApplicationDbContextSeed>>();
|
var logger = services.GetService<ILogger<ApplicationDbContextSeed>>();
|
||||||
var settings = services.GetService<IOptions<AppSettings>>();
|
var settings = services.GetService<IOptions<AppSettings>>();
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ using Microsoft.eShopOnContainers.Services.Identity.API.Services;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using StackExchange.Redis;
|
using StackExchange.Redis;
|
||||||
using System;
|
using System;
|
||||||
@ -117,7 +118,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// 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 void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
//loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
//loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||||
//loggerFactory.AddDebug();
|
//loggerFactory.AddDebug();
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
|
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<handlers>
|
<handlers>
|
||||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||||
</handlers>
|
</handlers>
|
||||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
|
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" hostingModel="InProcess">
|
||||||
|
<environmentVariables>
|
||||||
|
<environmentVariable name="COMPLUS_ForceENC" value="1" />
|
||||||
|
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
|
||||||
|
</environmentVariables>
|
||||||
|
</aspNetCore>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
</configuration>
|
</configuration>
|
@ -7,8 +7,8 @@
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class PicController : ControllerBase
|
public class PicController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly IHostingEnvironment _env;
|
private readonly IWebHostEnvironment _env;
|
||||||
public PicController(IHostingEnvironment env)
|
public PicController(IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
_env = env;
|
_env = env;
|
||||||
}
|
}
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.ActionResults;
|
using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.ActionResults;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
public class HttpGlobalExceptionFilter : IExceptionFilter
|
public class HttpGlobalExceptionFilter : IExceptionFilter
|
||||||
{
|
{
|
||||||
private readonly IHostingEnvironment env;
|
private readonly IWebHostEnvironment env;
|
||||||
private readonly ILogger<HttpGlobalExceptionFilter> logger;
|
private readonly ILogger<HttpGlobalExceptionFilter> logger;
|
||||||
|
|
||||||
public HttpGlobalExceptionFilter(IHostingEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
|
public HttpGlobalExceptionFilter(IWebHostEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
|
||||||
{
|
{
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// 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 void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
//loggerFactory.AddAzureWebAppDiagnostics();
|
//loggerFactory.AddAzureWebAppDiagnostics();
|
||||||
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
||||||
|
@ -6,15 +6,16 @@
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults;
|
using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
public class HttpGlobalExceptionFilter : IExceptionFilter
|
public class HttpGlobalExceptionFilter : IExceptionFilter
|
||||||
{
|
{
|
||||||
private readonly IHostingEnvironment env;
|
private readonly IWebHostEnvironment env;
|
||||||
private readonly ILogger<HttpGlobalExceptionFilter> logger;
|
private readonly ILogger<HttpGlobalExceptionFilter> logger;
|
||||||
|
|
||||||
public HttpGlobalExceptionFilter(IHostingEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
|
public HttpGlobalExceptionFilter(IWebHostEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
|
||||||
{
|
{
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
public class OrderingContextSeed
|
public class OrderingContextSeed
|
||||||
{
|
{
|
||||||
public async Task SeedAsync(OrderingContext context, IHostingEnvironment env,IOptions<OrderingSettings> settings, ILogger<OrderingContextSeed> logger)
|
public async Task SeedAsync(OrderingContext context, IWebHostEnvironment env,IOptions<OrderingSettings> settings, ILogger<OrderingContextSeed> logger)
|
||||||
{
|
{
|
||||||
var policy = CreatePolicy(logger, nameof(OrderingContextSeed));
|
var policy = CreatePolicy(logger, nameof(OrderingContextSeed));
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API
|
|||||||
Log.Information("Applying migrations ({ApplicationContext})...", AppName);
|
Log.Information("Applying migrations ({ApplicationContext})...", AppName);
|
||||||
host.MigrateDbContext<OrderingContext>((context, services) =>
|
host.MigrateDbContext<OrderingContext>((context, services) =>
|
||||||
{
|
{
|
||||||
var env = services.GetService<IHostingEnvironment>();
|
var env = services.GetService<IWebHostEnvironment>();
|
||||||
var settings = services.GetService<IOptions<OrderingSettings>>();
|
var settings = services.GetService<IOptions<OrderingSettings>>();
|
||||||
var logger = services.GetService<ILogger<OrderingContextSeed>>();
|
var logger = services.GetService<ILogger<OrderingContextSeed>>();
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace Ordering.FunctionalTests
|
|||||||
testServer.Host
|
testServer.Host
|
||||||
.MigrateDbContext<OrderingContext>((context, services) =>
|
.MigrateDbContext<OrderingContext>((context, services) =>
|
||||||
{
|
{
|
||||||
var env = services.GetService<IHostingEnvironment>();
|
var env = services.GetService<IWebHostEnvironment>();
|
||||||
var settings = services.GetService<IOptions<OrderingSettings>>();
|
var settings = services.GetService<IOptions<OrderingSettings>>();
|
||||||
var logger = services.GetService<ILogger<OrderingContextSeed>>();
|
var logger = services.GetService<ILogger<OrderingContextSeed>>();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -15,10 +16,10 @@ namespace Webhooks.API.Infrastructure
|
|||||||
{
|
{
|
||||||
public class HttpGlobalExceptionFilter : IExceptionFilter
|
public class HttpGlobalExceptionFilter : IExceptionFilter
|
||||||
{
|
{
|
||||||
private readonly IHostingEnvironment env;
|
private readonly IWebHostEnvironment env;
|
||||||
private readonly ILogger<HttpGlobalExceptionFilter> logger;
|
private readonly ILogger<HttpGlobalExceptionFilter> logger;
|
||||||
|
|
||||||
public HttpGlobalExceptionFilter(IHostingEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
|
public HttpGlobalExceptionFilter(IWebHostEnvironment env, ILogger<HttpGlobalExceptionFilter> logger)
|
||||||
{
|
{
|
||||||
this.env = env;
|
this.env = env;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
|
@ -13,7 +13,7 @@ namespace WebMVC.Infrastructure
|
|||||||
{
|
{
|
||||||
public class WebContextSeed
|
public class WebContextSeed
|
||||||
{
|
{
|
||||||
public static void Seed(IApplicationBuilder applicationBuilder, IHostingEnvironment env)
|
public static void Seed(IApplicationBuilder applicationBuilder, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
var log = Serilog.Log.Logger;
|
var log = Serilog.Log.Logger;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ using Microsoft.eShopOnContainers.WebMVC.ViewModels;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.IdentityModel.Logging;
|
using Microsoft.IdentityModel.Logging;
|
||||||
using StackExchange.Redis;
|
using StackExchange.Redis;
|
||||||
@ -53,7 +54,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("sub");
|
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("sub");
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
|
@ -9,10 +9,10 @@ namespace eShopConContainers.WebSPA.Server.Controllers
|
|||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
private readonly IHostingEnvironment _env;
|
private readonly IWebHostEnvironment _env;
|
||||||
private readonly IOptionsSnapshot<AppSettings> _settings;
|
private readonly IOptionsSnapshot<AppSettings> _settings;
|
||||||
|
|
||||||
public HomeController(IHostingEnvironment env, IOptionsSnapshot<AppSettings> settings)
|
public HomeController(IWebHostEnvironment env, IOptionsSnapshot<AppSettings> settings)
|
||||||
{
|
{
|
||||||
_env = env;
|
_env = env;
|
||||||
_settings = settings;
|
_settings = settings;
|
||||||
|
@ -13,7 +13,7 @@ namespace WebSPA.Infrastructure
|
|||||||
{
|
{
|
||||||
public class WebContextSeed
|
public class WebContextSeed
|
||||||
{
|
{
|
||||||
public static void Seed(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
public static void Seed(IApplicationBuilder applicationBuilder, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
var log = loggerFactory.CreateLogger<WebContextSeed>();
|
var log = loggerFactory.CreateLogger<WebContextSeed>();
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using StackExchange.Redis;
|
using StackExchange.Redis;
|
||||||
using System;
|
using System;
|
||||||
@ -61,7 +62,7 @@ namespace eShopConContainers.WebSPA
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// 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, IAntiforgery antiforgery)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory, IAntiforgery antiforgery)
|
||||||
{
|
{
|
||||||
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace WebStatus
|
namespace WebStatus
|
||||||
@ -35,7 +36,7 @@ namespace WebStatus
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// 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 void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
//loggerFactory.AddAzureWebAppDiagnostics();
|
//loggerFactory.AddAzureWebAppDiagnostics();
|
||||||
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);
|
||||||
|
@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@ -42,7 +43,7 @@ namespace WebhookClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
|
|
||||||
var pathBase = Configuration["PATH_BASE"];
|
var pathBase = Configuration["PATH_BASE"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user