View Single Post
 
Old July 18th, 2007, 09:22 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I don't think that "thread safe" is being used correctly here. Either way, whether the static var is or isn't thread safe is irrelevant.

Your web assemblies are loaded in one application, the ASP.NET worker process. So the static variables are in the scope of all page requests that come in.

You should really avoid using static variables. Instead you should be using any other means for user based values, which could be viewstate, session or anything else persistent (like a database).

Is there a reason you have chosen static vars instead of something like session?

-Peter