views:

27

answers:

1

I have an ASP.NET 3.0 application that works fine on one server. It uses application variables to check if a user has checked out a file and locks it for all other users. When I put the application on the load balanced servers, the application didnt work as expected since it multiple users got sent to multiple servers and each user could check out the requred file.

The main point is that is there any way I can share the application variables in my application even though it is distributed on multiple servers. Ot is there a better way to get a global variable?

+1  A: 

If you are splitting the web servers but have a common database server, then writing that information to the database is an option.

You can create a name/value table to store the variables that you commonly are storing in the application.

ManiacZX
Yup, moving it the database is generally the easy solution that I have seen. I believe J Spolsky recommended storing sessions in the DB on one of the stackoverflow podcasts.
Kyle Brandt