奇怪 - 会话 - Inproc - 模式使用 cookie 名称 asp_net 会话 id,超时 20,在客户端之间共享,不确定!!!session 对于每个客户端应该是唯一的,但它是在客户端之间共享的!
在我的 asp.net 应用程序中,购物车会话已在请求之间共享,不知道是如何发生的,它应该因请求而异,IIS 中的每个请求都应该有每个会话,但 IIS 中的所有请求都是共享的通过本次会议`public class PODCart {
#region Properties
public List<PODCartItem> Items { get; private set; }
#endregion
#region Singleton Implementation
public static readonly PODCart Instance;
static PODCart()
{
if (HttpContext.Current.Session["C"] == null)
{
Instance = new PODCart();
Instance.Items = new List<PODCartItem>();
HttpContext.Current.Session["C"] = Instance;
}
else
Instance = (PODCart)HttpContext.Current.Session["C"];
}
protected PODCart() { }
}`
尽管单例实现已经完成,但确实需要尽快知道修复。