|
-
Jan 7th, 2003, 12:21 AM
#5
PowerPoster
Im writing a web app and so far im using global variables although im not sure this is the best way to go, is it possible while using global variables for more than one user to access the same object??
You have to be aware of concurrency issues when using an instance of the HTTPApplicationState object (Application). Theoretically, two pages, for instance, could access the same object from the global dictionary and make updates, canceling out the other page's update. One way around this is by using the 'Application.Lock --- Application.Unlock' methods, whenever your code makes a change to the object. However, this will adversly affect application performance and open up doors for potential deadlocks.
But, if all your objects are readonly, then you should be fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|