在Asp.net应用程序中,使用WCF胜过Web服务有什么优势? [英] What is the advantage using WCF over Webservice in asp.net application?

查看:69
本文介绍了在Asp.net应用程序中,使用WCF胜过Web服务有什么优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总是存在配置端点的额外开销,并且那里也有配置设置.

因此,在大多数情况下,在ASP.NET应用程序中使用WCF优于Webservice有什么好处?

感谢Rajiv

There is always additional overhead of configuring endpoints and also configuration settings are there.

So, in most of the cases, what is the benefit using WCF over Webservice in ASP.NET application?

Thanks Rajiv

推荐答案

WCF比Web服务支持更多的WS- *标准.您实际上无法在Web服务中进行流式传输或支持原子事务等. WCF支持多个绑定的HTTP,WSHTTP,TCP,MSMQ等.ASP.NETWeb服务只有http.

Web服务没有实例管理,即您不能拥有单例Web服务或完整会话的Web服务.您可以维护Web服务的状态,但是我们都知道那是多么的痛苦.

WCF与Web Services非常相似,它还包含Remoting和.NET Enterprise Services(COM + Services组件)的许多功能.

它像Remoting一样具有灵活性和可扩展性.
它只像Web服务那样兼容.
它像企业服务一样具有丰富的功能,

1)WCF可以维护像COM +一样的事务
2)可以维持状态
3)它可以控制并发
4)它可以托管在IIS,WAS,自助托管,Windows服务上
5)它具有AJAX集成和JSON(JavaScript对象表示法)支持
WCF supports more of the WS-* standards than Web Services. You can’t really do streaming or support atomic transactions etc in Web Services. WCF supports multiple binding’s HTTP, WSHTTP, TCP, MSMQ etc. ASP.NET Web Services has only http.

Web Services have no instance management, i.e. you cannot have a singleton web service, or a session-full web service. You can maintain state of web services but we all know how painful that is.

WCF while very similar to Web Services also incorporates many of the features of Remoting and .NET Enterprise Services (COM+ Services Components).

It is flexible and extensible like Remoting only more so.
It is compatible like Web Services only more so.
It is feature rich like Enterprise Services only more so

1) WCF can maintain transaction like COM+ Does
2) It can maintain state
3) It can control concurrency
4) It can be hosted on IIS, WAS, Self hosting, Windows services
5) It has AJAX Integration and JSON (JavaScript object notation) support


这篇关于在Asp.net应用程序中,使用WCF胜过Web服务有什么优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆