ASP.NET 获取当前网址 HOST

private IHttpContextAccessor _HttpContextAccessor;   //注入

var Host= _HttpContextAccessor.HttpContext.Request.Host.ToString();

  

 

posted @ 2021-07-08 21:55  林小强  阅读(380)  评论(0编辑  收藏  举报