开发者

Share data between web services

开发者 https://www.devze.com 2023-01-18 16:12 出处:网络
I want to create two web services, A and B, hosted in IIS. A is used to updated a variable X and B to retrieve the value of X.

I want to create two web services, A and B, hosted in IIS. A is used to updated a variable X and B to retrieve the value of X.

The question is whether I can make this work by declaring X as a static class variable.开发者_Go百科 If not, what can I do ?

PS: Combining them into a single service is not an option for me.


The answer is simply YES. One can use static variable since all instances of the web service are executed in the same app domain.

0

精彩评论

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