热门标签
更多>
搜索结果
查询Tags标签: RemoteIpAddress,共有 2条记录-
C#.NET6 ASP.NET CORE MVC 获取客户端IP
一、使用HttpContextAccessor 在Program.cs中增加一行: //获取IP使用builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();var builder = WebApplication.CreateBuilder(args);// Add services to the container. builder.Services.AddCo…
2021/12/23 17:37:03 人评论 次浏览 -
C#.NET6 ASP.NET CORE MVC 获取客户端IP
一、使用HttpContextAccessor 在Program.cs中增加一行: //获取IP使用builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();var builder = WebApplication.CreateBuilder(args);// Add services to the container. builder.Services.AddCo…
2021/12/23 17:37:03 人评论 次浏览