如何让WcfFacility为每个呼叫提供服务,我已经尝试过了
Component.For<IService1>().ImplementedBy<Service1>().AsWcfService(new DefaultServiceModel()).LifeStyle.PerWcfOperation()
但是,当我在没有勾选"create new proxy“框的情况下运行WCF Test client时,它并不是每次都运行ctor。
请帮帮忙
骨骼
(ps这和我的另一篇文章不是同一个问题,这也是一个问题)
发布于 2011-03-23 01:43:33
您是否在服务定义中指定了percall:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
class MyService : IMyContract {...}发布于 2011-03-23 08:18:56
设拉子指出了一种我所知道的方法,无论PerCall lifeStyle PerSession的管理是如何知道的,我都希望能找到一种不包含默认属性的方法。
我最近在changed the line的问题中的代码
Component.For<IService1>().ImplementedBy<Service1>().ActAs(new DefaultServiceModel().Hosted()).LifeStyle.PerWcfOperation()这导致了一个PerCall (在我的机器上)。会非常感兴趣,如果这是预期的行为
https://stackoverflow.com/questions/5394101
复制相似问题