开发者

Web Service multi-client basic question

开发者 https://www.devze.com 2023-02-22 17:19 出处:网络
I\'ve been reading up on web service all day but I\'m still missing a basic understanding on web services as they relate to multiple clients.

I've been reading up on web service all day but I'm still missing a basic understanding on web services as they relate to multiple clients.

The web service runs on a web server. The service exposes various methods. Multipl开发者_开发知识库e clients may call the same service method simultaneously. Question: Does each client get its own copy of the method or does the code in the method implementation have to start a thread for each client and process each client's request in it's own thread? What am I missing?

Thanks in advance.

  • DP


It depends on configuration. In WCF you can configure 'singleton' ie. one service instance, which will work with all clients. Or you can set another value which will create separate instance for each client calling it. You will definitely get more at MSDN.

Edit:

Check this attribute: InstanceContextBehavior

0

精彩评论

暂无评论...
验证码 换一张
取 消