Closed supersdar closed 8 months ago
不是吧。还得安装NLog.Extensions.Logging、using NLog.Web、using Serilog。这也太太太麻烦了。能不能单加一个builder.Host.UseAgileConfig(); 就能自动替换默认的Configuration接口
不是吧。还得安装NLog.Extensions.Logging、using NLog.Web、using Serilog。这也太太太麻烦了。能不能单加一个builder.Host.UseAgileConfig(); 就能自动替换默认的Configuration接口
。。。。 你在说什么。。 如果你不需要当然不用安装 serilog,我只是顺便演示一下如何使用 serilog 而已。 你只需要调用 UseAgileConfig 方法就可以。
加了“builder.Host.UseAgileConfig();”,但是获取不到
@kklldog 找到原因了,是防火墙把端口ban了,像这种情况应该也有会错误日志吧。要去哪里看。等有同样问题时,以后用户也能自己找
@kklldog 找到原因了,是防火墙把端口ban了,像这种情况应该也有会错误日志吧。要去哪里看。等有同样问题时,以后用户也能自己找
在 client 侧肯定会有日志,类似 server refuse the request 这种
var builder = WebApplication.CreateBuilder(args); builder.Configuration.AddAgileConfig(); // Add services to the container. builder.Services.AddControllersWithViews(); builder.Services.AddAgileConfig(); var app = builder.Build();
// Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles();
app.UseRouting(); app.UseAuthorization();
app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run(); 大佬,加一下新版net core的配置吧.我自己试来试去读不到