Posted on: 4/28/2015 10:07:10 PM | Views : 609

I have a Asp.net application. I have had an odd error today which I can only explain through a global variable I am using being corrupted from another user session or thread. I wrongly assumed that the global would be thread safe, but on doing some research it seems it may not be. My application has within it a General vb module. Within this module I have defined 3 Public string variables. When the aspx page is called, a user code is posted. This user code identifies the database that this user should be using. This server has lots of separated databases. The database name is stored in a global variable. I only want to store this name once as it is valid for the duration of the call. Depending on the web call the code then goes off and speaks to the database and get data to return to the user. I seem to have an example of a call being made by a user which ends up with data from two different databases. It is as if the database global va ...

Go to the complete details ...