Session questionhttp://forums.asp.net/t/1750427.aspx/1?Session+questionSat, 17 Dec 2011 15:06:05 -050017504274735395http://forums.asp.net/p/1750427/4735395.aspx/1?Session+questionSession question <p>Hello all:</p> <p>I am relatively new to ASP.NET so please forigve the nubie question!</p> <p>I am using Session to store user data BUT I am seeing the following:</p> <p>User1 logs in:</p> <p>I set the Session[&quot;User&quot;] = &quot;user1&quot;</p> <p>User2 logs in:</p> <p>I set Session[&quot;User&quot;] = &quot;user2&quot;</p> <p>I thought that Session was specific to the current session but it seems not to be since it seems I am altering the same Session var. I say this because after user2 logs in the Session var changes to Session[&quot;User&quot;] = &quot;user2&quot; and anything user1 does is saved for &quot;user2&quot;??? Certainly I am doing something wrong and maybe misunderstood how to use Session???</p> <p>Thanks in advance</p> <p>Marshall</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> 2011-12-16T15:34:53-05:004735425http://forums.asp.net/p/1750427/4735425.aspx/1?Re+Session+questionRe: Session question <p>No ... that should not be the case. That is&nbsp;the case for the Application or Cache objects.</p> <p>Make sure that when you are testing this that you don't use the same browser / computer, because even though you may be logged on with a different account, the session may still be shared. Try testing from two seperate computers.</p> <p>hope this helps,</p> <p>sivilian</p> 2011-12-16T15:56:43-05:004735824http://forums.asp.net/p/1750427/4735824.aspx/1?Re+Session+questionRe: Session question <p>BINGO! sivilian. I was using the same browser on the same machine! Tested on 2 diff machines and it worked fine. Weeeeeeeeeeeew! That scared the fire out of me! Is there a way to safeguard against this behavior on the same machine?</p> <p>Thanks a ton for you help!</p> <p>&nbsp;</p> 2011-12-16T21:35:04-05:004735892http://forums.asp.net/p/1750427/4735892.aspx/1?Re+Session+questionRe: Session question <p>If you want to open different session in the same browser, at least in IE, you can go to the file menu and select New Session. This will open a new window in a new session</p> <p>sivilian</p> 2011-12-16T23:26:55-05:004736523http://forums.asp.net/p/1750427/4736523.aspx/1?Re+Session+questionRe: Session question <p>sivilian:</p> <p>Duh! I should know that! LOL!</p> <p>You've been a great help!</p> <p>&nbsp;</p> <p>Thank you</p> <p>Marshall</p> 2011-12-17T15:06:05-05:00