私は、データを収集し、次の方法で、サーバー上にクッキーを設定するためにPOSTリクエストを使用します。読むクッキーHTTPS
HttpCookie cookies = new HttpCookie(name) {
Value = value,
Expires = DateTime.MaxValue,
Secure = true };
HttpContext.Current.Response.Cookies.Remove(name);
HttpContext.Current.Response.Cookies.Add(cookies);
POSTリクエストは、私はjsファイルを使用してページをリロードし終えた後。 私はそのページにcookieの値を使用します。
私は彼らが好き取得しよう:
if (HttpContext.Current.Request.Cookies[NameCookieName] != null)
{
name = HttpContext.Current.Request.Cookies[NameCookieName].Value;
}
if (HttpContext.Current.Request.Cookies[RegionCookieName] != null)
{
region = HttpContext.Current.Request.Cookies[RegionCookieName].Value;
}
を、私はそれが正常に動作しているHTTPを使用している場合。
私はHTTPS Cookieを使用していますが、私がそれらを読むとcoookieの値はNULLです。
HTTPSを使用してCookieを設定/取得するにはどうすればよいですか?