コード例 #1
0
ファイル: Auth.cs プロジェクト: pcop/uploadresumabledemo
    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);
    }