diff --git a/src/aspnet-core/src/YoyoBoot.Web.Host/Startup/Program.cs b/src/aspnet-core/src/YoyoBoot.Web.Host/Startup/Program.cs index 87ccaad6..57003016 100644 --- a/src/aspnet-core/src/YoyoBoot.Web.Host/Startup/Program.cs +++ b/src/aspnet-core/src/YoyoBoot.Web.Host/Startup/Program.cs @@ -7,11 +7,18 @@ using System.Net; using System.Linq; using System.Net.Sockets; using Alipay.AopSdk.Core.Domain; +using Microsoft.Extensions.Configuration; +using ICS.Common.Helpers; +using ICS.Common.Extension; namespace YoyoBoot.Web.Host.Startup { + + public class Program { + + // private readonly IConfiguration _configuration; public static int Main(string[] args) { Log.Logger = CreateSerilogLogger(); @@ -47,9 +54,11 @@ namespace YoyoBoot.Web.Host.Startup host.AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork); // Console.WriteLine(ippaddress); // var environmentName = Environment.GetEnvironmentVariable("Hosting:Environment"); + + var webHostBuilder = WebHost.CreateDefaultBuilder(args); - var webHostBuilder = WebHost.CreateDefaultBuilder(args); + return webHostBuilder .UseIIS() @@ -71,7 +80,9 @@ namespace YoyoBoot.Web.Host.Startup } else { - options.Listen(ippaddress, 9960); + // var value = _configuration["CustomerBusiness:Value"].ToStringExt(); + var aa = AppConfigurtaionServices.Configuration["Port"].ToInt(); + options.Listen(ippaddress, aa); } // options.ListenAnyIP(6698) ; diff --git a/src/aspnet-core/src/YoyoBoot.Web.Host/appsettings.json b/src/aspnet-core/src/YoyoBoot.Web.Host/appsettings.json index de07e138..63cfe00b 100644 --- a/src/aspnet-core/src/YoyoBoot.Web.Host/appsettings.json +++ b/src/aspnet-core/src/YoyoBoot.Web.Host/appsettings.json @@ -214,5 +214,6 @@ "api_secret": "YmVjNjQ5NjcyNTRkNGEzMTA4MDc1ZGFh", "api_key": "209462533d2cb2d912efe2a1b03e5546", "hostUrl": "https://spark-api.xf-yun.com/v3.5/chat" - } + }, + "Port": 8860 }