I have created an online shopping website which will be deployed on a web farm. As a result of this, I've decided to use the Stateserver Session Management provided by ASP.NET. Now, I have a login page. After the user logs in successfully I redirect him to the Catalogue page where he can subsequently add books to his shopping cart.
From what I have come to understand, the Session is stored in the form of a key-value pair. So, if I create a Session for a particular user(say his name is "abc") then I would do something like this:
Session["abc"]=tmp; //where tmp is a "List" of items that "abc" has added to the cart
Now after he is redirected to another page, how do I retrieve this session? From what I have read I would have to write:
temp=Session["abc"]
How do I send this username to another page as a parameter. Since, this is on a web farm the client could be connected to different servers for each request and there could be multiple clients logging in at the same time. So if I create a Session for all of them with their respective usernames as the keys, how can I retrieve their sessions when they are browsing different pages?
I don't think I have understood the exact working of the Session ID, so if someone could help me with that it would be great.