Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my website when two people try to open two different pages at the same instant. It often happens that sometimes pages are mixed, i.e. sometimes first person gets page of another or vice versa.

I tried to check the session and view state data by printing the value, but they are also swapped and changed. Concurrency is not maintained. Please help me resolve the problem as soon as possible.
Posted
Comments
Praveen Kumar Upadhyay 8-Jan-15 2:51am    
You must be using some static variables in those pages.
rummer 8-Jan-15 4:41am    
No. I have not used any static variables.

1 solution

As Praveen says, you must be having Static Variables declared and used somewhere.

What happens is, Static variable's life is application level. So, when you declare and use that, the first user sets data into it. At the same time, when other users sees the page, it shows the last updated value, not the default one. This is the nature of Static variable.
 
Share this answer
 
Comments
Rahul Gupta (Robin) 8-Jan-15 4:23am    
Dont use Static varible...
Rahul, you should reply to OP, under the question. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900