예제 #1
0
    public static void SetLogin()
    {
        var Cookie = new HttpCookie(
            "U",
            StringCrypt.Encrypt(Convert.ToBase64String(StringCrypt.GetSHA1(HttpContext.Current.Request.UserAgent + HttpContext.Current.Request.UserHostAddress)), "eri01268")
            );

        Cookie.HttpOnly = true;
        HttpContext.Current.Response.Cookies.Add(Cookie);
    }