System.Web.HttpContext.Current.Request.Url.Host
/// <summary> /// 获取当前站点域名 /// </summary> /// <returns></returns> public string GetSiteUrl() { string fullUrl = Request.Url.AbsoluteUri; string querystring = Request.Url.PathAndQuery; string url = fullUrl.Replace(querystring, "") + "/"; return url; }
AppDomain.CurrentDomain.BaseDirectory + "\\applogs";