Beispiel #1
0
        /// <summary>
        /// 获取机器唯一码
        /// </summary>
        /// <param name="key">唯一码命名</param>
        /// <returns></returns>
        public string GetMachineKey(string key)
        {
            string hitkey = ManageCookies.GetCookieValue(key);

            if (string.IsNullOrEmpty(hitkey))
            {
                hitkey = Guid.NewGuid().ToString();
                ManageCookies.CreateCookie(key, hitkey, true, DateTime.Now.AddDays(1), CookieDomain, true);
            }

            return(hitkey);
        }