c# - Are WebServices Stateless if I have a Static variable? -
Assume that I have a web service with a variety of methods, and that web service has a public share variable If I receive a request from Client A and it will change the value of this variable, then will Client B see the value changed by Client A?
Let me try to explain myself better, example
Suppose i have this variable:
public as boolean Shared State = False (Visual Basic) Public Stable Boole State = Wrong; (C #) and then the client gets
state = true (VB) state = true; (C #) When customer checks the value of B variable, is it true or false?
Static variables will be shared in all proxy calls, unless it is a web garden and An implementation process is a fixed variable that is scotched in the app domain.
In the above case, Clients B will see the value set by Client A.
If this is a web form, then the stable variable will be per web server and show strange behavior in web requests.
Due to a common note, due to locking it, it is advisable to be extremely alert with writeable write values in web requests.
Comments
Post a Comment