//遍曆cookies
for (int i = 0; i < HttpContext.Current.Request.Cookies.Count; i++)
{
Response.Write(HttpContext.Current.Request.Cookies.Keys[i] + ":" +HttpContext.Current.Request.Cookies[i].Value.ToString()+ "<br>");
}
//遍曆session
for (int i = 0; i < HttpContext.Current.Session.Count; i++)
{
Response.Write(HttpContext.Current.Session.Keys[i] + ":" + HttpContext.Current.Session[i].ToString() + "<br>");
}
//遍曆application
for (int i = 0; i < HttpContext.Current.Application.Count; i++)
{
Response.Write(HttpContext.Current.Application.Keys[i] + ":" + HttpContext.Current.Application[i].ToString() + "<br>");
}