How does the code work in a WebService?

I am currently working on a WebService that should be used by many different thin clients. I have tested it so far with 1 website as a client.

My question is that the web service has classes correctly. When someone signs up on a website that uses a web service, is the main class an instance for that instance of the one who uses it?

For example, during debugging, I have 1 client.

  • The service starts with a variable that is initialized as "Hello World". The client requests a string from the service, and then sends it back.
  • The service then modifies the internal variable should be equal to the one that was sent by the client. Then the service add 2 to the end, so the variable is now "Hello World 2".
  • The client requests a string update and receives Hello World 2.
  • Another user is logging in. They ask for a string expecting Hello World but get Hello World 2. Now that they send it back, they get Hello World 2
    • This is an undesirable result, and I try to avoid it.

How should I do it?

+3
source share
2 answers

WebService ASP.NET . "" HttpApplications, , ASP.NET, , . , , , SOAP ( , ). . ( " " ), , .

. , , , , , (a.) - (.) , , .

. , , , , , , . ; , CSR call- . , , , , , , . , , "" , ( ) (-).

+3

, reset , , . , , .

WCF, PerSession InstanceContextMode, . , . . .

+5

All Articles