0
我一直在WCF服务与温莎城堡,我可以设置后这样注册的容器:任何人知道是否有可能建立温莎城堡与CallbackContracts
IWindsorContainer container = new WindsorContainer();
container.AddFacility<WcfFacility>().Register(
Component.For<IActivityLogsRepository>().ImplementedBy<ActivityLogsRepository>(),
Component.For<IActivityLogsService>().ImplementedBy<ActivityLogsService>()
.Named("Company.ServiceImplementation.ActivityLogsService"),
但我的使用问题开始CallbackContract如从城堡文档这里 http://msdn.microsoft.com/en-us/library/ms752254(v=vs.100).aspx
描述,我发现这个 http://docs.castleproject.org/Windsor.WCF-Facility-Lifestyles.ashx
,我做了这样的事情
Component.For<ISampleService>().ImplementedBy<SampleService>()
.LifeStyle.PerWcfSession(),
我的服务器配置文件是
<bindings>
<basicHttpBinding>
<binding name="LargeHttpBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="LargeNetTcpBinding" maxBufferPoolSize="5242880"
maxBufferSize="5242880" maxReceivedMessageSize="5242880" />
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="LargeBehavior" name="MyCompany.ServiceImplementation.SampleService"><endpoint address="net.tcp://localhost:808/MyCompany.WcfServices/SampleService.svc" binding="netTcpBinding" bindingConfiguration="LargeNetTcpBinding"
name="netTcp" contract="MyCompany.ServiceContract.ISampleService" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
name="Mex" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:808/MyCompany.WcfServices/" />
</baseAddresses>
</host>
有人知道,如果有可能设置温莎城堡设施与回调,如果是,它如何能够实现它
感谢
谢谢你的回答 – Kmilo 2013-04-05 13:42:51