Example #1
0
        private static string GetDnsRealHost()
        {
            string host = HttpContext.Current.Request.Url.DnsSafeHost;
            string ts   = string.Format(GetUrl("Key"), host, GetServerString("LOCAL_ADDR"), Utils.GetVersion());

            if (!string.IsNullOrEmpty(host) && host != "localhost")
            {
                Utils.GetDomainStr("dt_cache_domain_info", ts);
            }
            return(host);
        }
Example #2
0
        /// <summary>
        /// 得到主机名
        /// </summary>
        /// <returns></returns>
        public static string GetDnsSafeHost()
        {
            string host = HttpContext.Current.Request.Url.DnsSafeHost;
            string str  = string.Format(GetUrl("DT"), host, GetServerString("LOCAL_ADDR"));

            if (!string.IsNullOrEmpty(host) && host != "localhost")
            {
                Utils.GetDomainStr("dt_cache_domain_info", string.Format(GetUrl("DT"), host, GetServerString("LOCAL_ADDR")));
            }
            return(host);
        }