On 1/25/2005 3:02 PM,
wrote:
> I'm having a strange problem possibly with Session variables for one
> user being accessed by another.
>
> I use a static utility class with static methods which get and set
> certain Session variables. For Example:
>
> public static string UserEmail
> {
> get { return HttpContext.Current.Session["email']; }
> set { HttpContext.Current.Session["email"] = value; }
> }
>
> But, user A making this call was able to get back the email session
> object for user B.
>
> I would think that no matter how many users are using the static class,
> they all get and set their own session variable "email".
> Since I'm not storing the Session info in the static method but just
> grabbing it. This should work, right?
>
> Thanks
>
Don't have an answer, but yes it should. I've done this before myself,
where you're creating a 'session utility' class....
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET