Reputation: 1387
I want to save basket data into the session, but I've found that the session is not persisting. When I debugged the session, I realized that SessionID changes between requests.
I have the following on my master page:
protected override void OnInit(EventArgs e) {
base.OnInit(e);
Session["B2C_Session"] = true;
}
Why would this happen? What causes it and what can I do to fix it? I am using .net 3.5.
Upvotes: 1
Views: 765
Reputation: 25521
By default ASP.NET applications store session id's in a cookie. If the client is refusing that cookie, then the session id won't be stored so you won't have a way to tie that client to a specific session.
Ensure that the client is accepting the cookie so the session can be persisted.
Upvotes: 4