0
當我序列值和存儲在cookie中,我可以看到在Cookies文件夾中的cookie文本文件。但是,如果我不序列化該值,我不能看到cookie文本文件。我怎麼能看到的cookie文件夾
有我的代碼:
(序列化)
BinaryFormatter bf = new BinaryFormatter();
MemoryStream ms = new MemoryStream();
bf.Serialize(ms, "111");
byte[] bArr = ms.ToArray();
string sCookieVal = Convert.ToBase64String(bArr);
HttpCookie cook = new HttpCookie("cookieName");
cook.Value = sCookieVal;
cook.Expires = DateTime.Now.AddMinutes(20);
HttpContext.Current.Response.Cookies.Add(cook);
(反序列化)
HttpCookie cook = new HttpCookie("cookieName");
cook.Value = "111";
cook.Expires = DateTime.Now.AddMinutes(20);
HttpContext.Current.Response.Cookies.Add(cook);
爲什麼我看不到在cookies文件夾中反序列化的價值?它存儲在哪裏?一個phsycal路徑或虛擬路徑?
感謝您的幫助。