WCF REST服务或ASP.NET MVC控制器/行动? [英] WCF Rest Service or ASP.NET MVC Controllers/Actions?

查看:121
本文介绍了WCF REST服务或ASP.NET MVC控制器/行动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想AP preciate如果有人可以提供一些洞察哪一个更有益。

I would appreciate if someone can provide some insight into which one is more beneficial.

在WCF RESTful服务可以提供相同的functionaly作为ASP.Net MVC控制器,即URL可以适当使用控制器/动作而形成的。

RESTful service in WCF can provide the same functionaly as ASP.Net MVC Controller, i.e URLS can be formed appropriately using Controller/Action.

有没有使用一个比其他的真正的好处。

Is there real benefit of using one over the other.

WCF休息服务将提供..
1)证书认证开箱
2)记录
3)邮件标题等

WCF Rest service will provide.. 1) Cert Authentication out of the box 2) Logging 3) Message Headers etc

MVC
1)不同的操作结果开箱

MVC 1) Different Action Results out of the box

如果有人使用或讨论这两种技术。请让我知道

If someone has used or debated these two technologies . please let me know

更新:

我就做了MVC模式,因为它给了我很大的灵活性,我可以使用相同的操作来渲染CustomActionInvoker,这是真的很酷!不同的看法

I went ahead with the MVC Model as it gives me lot of flexibility and I can use the same action to render different views with CustomActionInvoker, which is really cool!!!

- RN

推荐答案

在这个时间点上,最好的选择是ASP.NET MVC。它提供了你需要能够设计RESTful的解决方案HTTP元清洁服务。

At this point in time, your best option is ASP.NET MVC. It provides cleaner access to the HTTP primitives you need to be able to design RESTful solutions.

WCF休息的唯一显著的优点是能够自托管服务,如果你想使用ADO.NET数据服务来提供的OData / ATOM服务,那么很明显WCF是您最佳的选择。

The only significant advantages of WCF Rest is the ability to self-host the service and if you want to use ADO.NET Data Services to deliver OData/Atom services, then obviously WCF is your best choice.

这篇关于WCF REST服务或ASP.NET MVC控制器/行动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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