WCF 和 ASMX Web 服务之间有什么区别? [英] What are the differences between WCF and ASMX web services?

查看:29
本文介绍了WCF 和 ASMX Web 服务之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全混淆了 WCF 和 ASMX Web 服务.前期用过很多web服务,现在引入了一个新东西,叫WCF.我仍然可以创建用作 Web 服务的 WCF.我认为 WCF 中会有更多的东西.

I am totally confused between WCF and ASMX web services. I have used a lot of web services in my earlier stage, and now there is this new thing introduced called WCF. I can still create WCF that function as a web service. I think there will be more stuff in WCF.

WCF 和 Web 服务之间有什么区别?应该什么时候使用?

What are the differences between WCF and Web services? When should each one be used?

推荐答案

Keith Elder 很好地比较了 ASMX 到 WCF 在这里.看看吧.

Keith Elder nicely compares ASMX to WCF here. Check it out.

ASMX 和 WCF 的另一个比较可以在在这里找到 - 我不是 100% 同意那里的所有观点,但它可能会给你一个想法.

Another comparison of ASMX and WCF can be found here - I don't 100% agree with all the points there, but it might give you an idea.

WCF 基本上是立体对象上的 ASMX"——它可以是 ASMX 的全部——加上更多!.

WCF is basically "ASMX on stereoids" - it can be all that ASMX could - plus a lot more!.

ASMX 是:

  • 易于编写和配置
  • 仅在 IIS 中可用
  • 只能从 HTTP 调用

WCF 可以是:

  • 托管在 IIS、Windows 服务、Winforms 应用程序、控制台应用程序中 - 您拥有完全的自由
  • 用于 HTTP(REST 和 SOAP)、TCP/IP、MSMQ 和更多协议

简而言之:WCF 将完全取代 ASMX.

In short: WCF is here to replace ASMX fully.

查看 MSDN 上的 WCF 开发人员中心.

更新:链接似乎已失效 - 试试这个:什么是Windows Communication Foundation?

Update: link seems to be dead - try this: What Is Windows Communication Foundation?

这篇关于WCF 和 ASMX Web 服务之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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