开发者

WCF Service with static variable and with two virtual directories

开发者 https://www.devze.com 2023-02-16 00:06 出处:网络
I have a WCF service with two endpoints/virtual directories, localhost/A/X.svc localhost/B/X.svc and it looks like, that both \"endpoint\" has an own instance from the sta开发者_StackOverflowtic v

I have a WCF service with two endpoints/virtual directories,

localhost/A/X.svc

localhost/B/X.svc

and it looks like, that both "endpoint" has an own instance from the sta开发者_StackOverflowtic variable. I've already know that it is because of the AppDomain. But is it possible that both enpoints use the same AppDomain?


If you want to share data between AppDomain, you could consider a different a approach than static variables which are effectively AppDomain bound. For instance files, a data base or memory mapped files (to name but a few).


I think, default, their endpoint are different, like "abc.com/A/X.svc" and "abc.com/B/X.svc"

0

精彩评论

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

关注公众号