ASP.NET MVC 获取当前访问域名

var request = filterContext.HttpContext.Request;
            string url = request.Url.Authority;
            string functionurl = request.RawUrl;
            base.OnActionExecuting(filterContext);
            filterContext.HttpContext.Response.Write("url:" + url + functionurl);
posted @ 2017-09-07 15:29  左正  阅读(2257)  评论(0编辑  收藏  举报