WCF Service Application VS ASP.NET Web Application?

寵の児 提交于 2019-12-25 03:19:35

问题


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. 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.

  2. 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.

Now I'm lost. What are the differences between these two possibilities to create a Web API?


回答1:


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

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



来源:https://stackoverflow.com/questions/26399868/wcf-service-application-vs-asp-net-web-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!