[英]WCF Reliable Messaging: stuttering service after maxPendingChannels increase
[英]Reliable Messaging accessible after adding ASMX web service via Service Reference
在VS2013中,我向现有的旧版ASMX Web服务中添加了Service Reference,而不是Web Reference。
这是否以某种方式使该参考能够实现WCF功能(如可靠消息传递)或WCF的任何其他新功能?
我已经读过一些书,并且我认为至少对于可靠消息传递,我们并没有神奇地获得此功能,因为据我了解,必须同时在“客户端”和“服务器”侧启用此功能,即两个端点都必须启用此功能,并且当然,在这种情况下,旧的ASMX Web服务(在这种情况下为服务器)不支持可靠消息传递标准,即使我要以某种方式配置“客户端”也是如此。
居民开发人员告诉我,将这些旧的ASMX Web服务添加为服务参考,因为它可以执行异步调用和“一些”其他配置好处,但是从我现在阅读的内容来看,我不太确定。
您需要的是适配器模式。 我看待它的方式更多是从设计模式的角度而不是WCF。
[ServiceContract]
public interface IService
{
[OperationContract]
string SayHello(string toWhom);
}
public class Service : IService
{
public string SayHello(string toWhom)
{
// consume the ASMX service here and return the result.
}
}
在绑定中,您可以使用ASMX中缺少的功能。
<bindings>
<wsHttpBinding>
<binding>
<reliableSession/>
<security>
<message />
</security>
</binding>
</wsHttpBinding>
</bindings>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.