WCF Service with static variable and with two virtual directories
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"
精彩评论