WCF服务应用程序VS ASP.NET Web应用程序? [英] WCF Service Application VS ASP.NET Web Application?

查看:100
本文介绍了WCF服务应用程序VS ASP.NET Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Web API来访问我的数据库.我想先创建一个单页应用程序网站,然后再创建一个iPhone,Android和Windows应用程序.经典.

I'm building a Web API to access my database. I would like to create a Single Page Application Website first then a iPhone, Android and Windows application. Classic.

我的数据和业务层已经完成.

My data and business layer are already finished.

  1. 首先,我决定构建一个Json WCF Web服务.在Visual Studio中,我创建了一个 WCF服务应用程序.我修改了Web.config文件以接受Json请求并实现了我的界面和svc文件.

  1. First I decided to build a Json WCF Webservice. In Visual Studio I created a WCF Service Application. I modified the Web.config file to accept Json requests and implemented my interface and svc file.

此后,我发现了带有 Web API模板 ASP.NET Web应用程序.因此,我决定更改并使用此完整的网站结构创建一个真正的Web API.

After that I discovered ASP.NET Web Application with the Web API template. So I decided to change and to create a real web API with this full website structure.

现在我迷路了.这两种创建Web API的可能性有什么区别?

推荐答案

与Microsoft的比较:

A comparative from microsoft : http://msdn.microsoft.com/en-us/library/jj823172(v=vs.110).aspx

老实说,我更喜欢WCF,因为在使用WSDL文件的SOAP Web服务的情况下,数据合同是生成的.

Personnaly, I prefer WCF because the datacontracts are generated in the case of SOAP Web Services with WSDL files.

这篇关于WCF服务应用程序VS ASP.NET Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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