ASMX Proxy 比WCF Proxy要简单?

ASMX Proxy没有ServiceContract和Channel stack的概念,ASMX直接使用SoapHttpClientProtocol,SoapHttpClientProtocol则完全是客户端的技术,其是对System.Net的HttpWebRequest的封装。而WCF proxy内部则是一个.NET Remoting的级别的地传输接口,最主要是是因为ASMX是一个“horizontal”的编程模型,更多时支持和实现Web Service的协议,而WCF是一个“Vertical” 的编程模型而,则要考虑和支持用户在客户端可以像在服务器端一样的操作和编程模型。

所以的ASMX Proxy的速度要快,在.NET 3.5中,对WCF优化后,BasicHttpBinding,类似和接近ASMX Proxy的性能,并且Wenlong也说,.NET 3.0 SP也就包含在.NET 3.5中了。

· Reuse the same proxy

· Use proxy that enables caching

· Disabling caching

· Proxy/Channel pooling

 

原文详见:
Performance Improvement for WCF Client Proxy Creation in .NET 3.5 and Best Practices
https://blogs.msdn.com/wenlong/archive/2007/10/27/performance-improvement-of-wcf-client-proxy-creation-and-best-practices.aspx