Posts

Showing posts from April, 2018

ASP.NET WEB API Programming

Image
ASP.NET WEB API. In this blog post we will see a sample example to quick start ASP.NET WEB API Programming. Before starting we will understand few important questions about the existence of the ASP.NET Web API. Question 1 : Is ASP.NET WEB API is replacement of WCF ? No,Web API has not replaced existing web service technology called WCF, but it's way different from WCF, where WCF follows SOAP based message formatting and Web API services  are non-SOAP based and returns plain XML or JSON string etc. Web API transport data over network using HTTP Protocal unlike WCF.  WCF uses different protocols for transferring data over HTTP, TCP, MSMQ, Named pipes.etc.   Question 2 :  ASP.NET Web API vs  WCF RESTful Service  ? Both  ASP.NET Web API and  WCF REST follows the REST principle but having following differences: ASP.NET Web API Web API supports full features of HTTP 

Introduction to ASP.NET WEB API

Image
What is ASP.NET WEB API ? WEB API is a framework for building HTTP services that can be accessed across wide range of devices and platforms including browsers, mobile devices,IOT(Internet of things) devices, desktop devices and cross platforms.  It is perfect for building restful services.though It can be used to create services which are not restful. Web API is very much similar to ASP.Net MVC pattern as it contains MVC like features model, controllers, action results, routing and filters .  Web API as the name suggests, is an API over the web which can be accessed using HTTP protocol. ASP .Net Web API is an add on to the ASP.Net Framework. and web api actions(methods) are requested by HTTP verbs(GET,POST,PUT,DELETE). What is API ? API : API stands for Application Program Interface, which has tools and protocols to develop software applications. What is Restful ? RE presentational S tate T ransfer (REST) is an architectural style that has a set of configur