Microsoft ASP.NET Web API framework is the best choice for developing HTTP services in more simpler way. It enables us to reach more wider ranger of clients such as browsers as well as mobile devices.In one of my previous web development tutorial about building RESTful service, I explained that the purpose of HTTP is not just acting as a transport layer (for example, in case of SOAP-based WCF service). However, its a very mature platform for developing Web APIs and utilizing its old simple concepts such as HTTP methods, HTTP status codes and URIs etc.

Note: You can download a PDF version of the same “A Practical Guide to ASP.NET Web API” here.

So, we can say that using ASP.NET Web API, we can create HTTP services

those are non-SOAP based like plain XML or JSON string.

using full features of HTTP.

reaching broader range of clients (browsers and mobile devices).

Following is the typical ASP.NET Web API processing architecture.

Test your ASP.NET Web API skill by answering a simple Question. A. GET

B. POST

C. DELETE

D. PUT To further test your ASP.NET Web API skill, Take a Complete FREE Online Test or MCSD Practice Exam: 70-486 (Developing ASP.NET MVC Web Applications). Simply Click Here. You are designing an ASP.NET Web API application. You need to select an HTTP verb to allow blog administrators to moderate a comment. Which HTTP verb should you use? Correct Answer: D



Lets move forward to implement all the above mentioned related features step by step.

Foundation – HTTP & REST Concepts

Resources and URIs

HTTP Methods

HTTP Status Codes

HTTP Content

Internet Media Types

REST

JSON & XML

Chapter 1:- Developing your first ASP.NET Web API service

In chapter 1, we will be creating a simple HTTP service using Web API. A step by step approach is used while developing the service and getting results as:

Creating a Web API Project in Visual Studio

Preparing a Domain Model

Adding Controller

Finally testing results in browser.

Chapter 2:- Performing CRUD operations using ASP.NET Web API service – Part 1

As chapter 1 only focuses getting records using HTTP GET verb only, this chapter provides complete detail understanding of all CRUD (Create, Retrieve, Update, Delete) operations using Web API. Discussion about all related HTTP verbs i.e. GET, PUT, POST, DELETE is provided.

Chapter 3:- Performing CRUD operations using ASP.NET Web API service – Part 2

As we have already developed Web API service in previous chapter, here in this chapter, we will be consuming already created HTTP service using jQuery. Complete code snippet of jQuery for consuming a Web API service is given with detailed understanding of jQuery AJAX call.

Chapter 4:- What’s new in ASP.NET Web API 2

Web API version 2 is released and this chapter briefly overview the top new features of ASP.NET Web API i.e.

Attribute Routing

Cross Origin Resource Sharing

Open Web Interface for .NET

IHttpActionResult

Web API OData