A Practical Guide to ASP.NET Web API

By | February 17, 2014
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisPin on Pinterest

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

You can find recent ASP.NET Web API Tutorials:

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

ASP.NET Web API Service
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?

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

 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
Chapter 5:- Model Validation in ASP.NET
Model in MVC framework is a representation of data structure. This Web API Tutorial focuses to understand and implement the data annotation technique for applying validation on a model class for an ASP.NET Web API application.

Chapter 6:- Exception Handling in ASP.NET Web API – Part 1
This chapter discusses about Exception Handling in ASP.NET Web API service. Instead of returning a generic status code i.e. 500 (Internal Server Error), a valid and meaning result should be sent back to client using HttpResponseException type.

Chapter 7:- Exception Handling in ASP.NET Web API – Part 2
To achieve the same purpose, as discussed in previous chapter, for more advanced scenarios: Web API provide Exception Fitlers and focus of the chapter is how to create an Exception Filter and return meaningful response.

Chapter 8:- ASP.NET Web API OData 5.3
Discussing in detail about features of Microsoft ASP.NET Web API OData 5.3 and 5.3.1 beta including:

  • Open Entity Type Support
  • Major Bug Fixes
  • Dynamic Collection Property in Open Type
  • More about flexibility to use $levels and $expand queries
  • Utilizing OData Core Libraries.

Extras:- Top 10 ASP.NET Web API Interview Questions
For a detailed and comprehensive list of Top 10 most important Interview Questions for Microsoft ASP.NET Web API that every Web Developer MUST Know.

This collection of ASP.NET Web API Tutorial will definitely help developers to understand in more practical way.


Start Date: Aril 01, 2017 12:00 AM PST
End Date: May 01, 2017  6:00 AM PST

Udemy Courses Online

Take All Online Courses – Lifetime Access

Other Related Articles:

Top 10 Interview Questions and Answers Series:

ASP.NET Jobs [Updated Daily]

Top ASP.NET MVC Jobs

Web Developer
Source: Indeed
Details: ASP.NET MVC, Entity Framework:. 3-5+ years of experience designing complex web applications in ASP.NET MVC, Entity Framework....  More
9 days ago

Redmond, WA 20-April-2017

Software Developer (Jr/Mid)
Source: Blue Canopy
Details: ASP.NET MVC and Web Forms, SQL Server, Visual Studio, TFS, C#, HTML, CSS, JavaScript. Blue Canopy Group, LLC is seeking a Software Developer (Jr/Mid) for our...  More
2 days ago

Fort Meade, MD 27-April-2017

Jr. Front End Angular 2 Developer
Source: Phenomenex
Details: Experience with ASP.NET MVC, REST Services. The right candidate will have a passion for software development, good communication skills, and the ability to...  More
4 days ago

Torrance, CA 90501 25-April-2017

Web Developer
Source: BoatUS
Details: ASP. BoatU.S., a part of GEICO and the Berkshire Hathaway family of companies, is looking for a Web Developer at our Headquarters in Alexandria, VA....  More
2 days ago

Alexandria, VA 28-April-2017

.NET Full Stack Developer
Source: Indeed
Details: .NET / ASP.NET / MVC development environment:. Candidates should have full stack experience for ASP.NET MVC Web Development in particular....  More
4 days ago

Cerritos, CA 90703 25-April-2017

Jr. Software Developer
Source: Ellie Mae
Details: Familiarity with ASP.NET MVC and/or .NET Web API a plus. Ellie Mae is a provider of enterprise on-demand solutions, including an online network, software and...  More
10 days ago

Pleasanton, CA 94588 19-April-2017

Web Developer
Source: Indeed
Details: Experience with bootstrap, ASP.NET MVC a plus. Expertise in front-end web development • Proficiency with HTML, CSS, javascript, Angular.js • Experience with...  More
30+ days ago

Redmond, WA 23-March-2017

Web Developer
Source: Indeed
Details: The National Fire Protection Association’s mission is to help save lives and reduce loss with information, knowledge and passion. An international nonprofit  More
15 days ago

Quincy, MA 14-April-2017

.NET Software Developer (Jr/Mid)
Source: Blue Canopy
Details: ASP.NET MVC and Web Forms, SQL Server, Visual Studio, TFS, C#, HTML, CSS, JavaScript. Blue Canopy Group, LLC is seeking a .Net Software Developer (Jr/Mid) for...  More
21 days ago

Fort Meade, MD 08-April-2017

Full Stack .Net Developer
Source: Indeed
Details: Candidates should have full stack experience for ASP.NET MVC Web Development in particular. Cypress North Corp, a leading software engineering and digital...  More
23 days ago

Buffalo, NY 14210 06-April-2017

Software Engineer .NET, C#
Source: American College of Healthcare Executives
Details: Utilize ACHE’s evolving technology stack including Visual Studio, C#, MS SQL Server, ASP.NET, MVC, XML/XSLT, JavaScript, and jQuery....  More
4 days ago

Chicago, IL 60606 26-April-2017

Creative Full-Stack ASP.Net Developer
Source: Indeed
Details: Minimum 3-5yrs ASP.Net MVC (C#) web development experience “Full-Stack” preferred:. Understanding of C#, MVC, HTML, Javascript, CSS, Entity Framework, SQL...  More
26 days ago

Denver, CO 03-April-2017

Jr. .Net Developer - TS/SCI
Source: LongView International Technology Solutions Inc.
Details: Strong knowledge of Visual Studio 2013, Team Foundation Server, ASP.Net MVC, Angular 1.7, Bootstrap v3, WebAPI , LINQ,....  More
30+ days ago

Fort Belvoir, VA 29-March-2017

Mobile Application Developer
Source: Indeed
Details: Proficient in writing Web API (ASP.NET MVC WebAPI, EF6.0). Prior experience in Hybrid web application development using ASP.NET MVC, and client frameworks like...  More
3 days ago

Charlotte, NC 26-April-2017

Web Developer
Source: GenConnect Recruiting and Consulting
Details: Solid understanding of Microsoft ASP.Net MVC 5 and Microsoft ASP.Net Web Api 2. Are you interested in joining a company that will map out your development...  More
26 days ago

Atlanta, GA 03-April-2017

Senior ASP.NET Developer
Source: Brogden Enterprises, Inc.
Details: Experience working with ASP.NET MVC and nHibernate. Member of the programming team responsible for the design, development and enhancement of websites....  More
8 days ago

Aberdeen, MD 21-April-2017

Senior ASP.NET Developer
Source: Brogden Enterprises, Inc.
Details: Experience working with ASP.NET MVC and nHibernate. Member of the programming team responsible for the design, development and enhancement of websites....  More
8 days ago

Huntsville, AL 21-April-2017

Software Engineer C#/ASP.NET MVC/JavaScript
Source: Cormant, Inc.
Details: You will be working on full stack development including Marionette client, and a C# MVC architecture with NHibernate/RDBMS as the back-end....  More
8 days ago

San Luis Obispo, CA 21-April-2017

Web Developer
Source: Hubert
Details: Experience with any modern MVC web architecture (ASP.NET MVC, Ruby/Rails, Django/Python, etc.). Programmer, web programmer, web development, MVC web...  More
26 days ago

Harrison, OH 45030 03-April-2017

Senior ASP.NET MVC Developer
Source: Indeed
Details: 4+ years experience developing web applications using ASP.NET MVC. The successful candidate provides great interpersonal and communication skills coupled with...  More
9 days ago

Lake Orion, MI 20-April-2017

Sr. C#/ASP.NET Developer
Source: Logic20/20
Details: *Strong C#, .NET framework (ASP.NET MVC, Entity Framework), jQuery, HTML 5 development Qualifications. Logic20/20 is a Seattle based Management & Technology...  More
12 days ago

Seattle, WA 98115 18-April-2017

SQL Report Developer (N. Pittsburgh)
Source: Indeed
Details: Experience with ASP.NET MVC is a plus. Please no contractors, local candidates only....  More
1 day ago

Pittsburgh, PA 29-April-2017

Application Developer
Source: Indeed
Details: MVC:. Microsoft.Net Framework 4.0 and higher, C#, ASP.Net, MVC, WebAPI, Javascript, AJAX, JSON. Franklin based technology consulting firm is recruiting a .Net...  More
12 days ago

Franklin, TN 37067 17-April-2017

Full Stack .NET Developer
Source: Forte Group
Details: Experience with ASP.NET, MVC and .NET Framework; One of the largest technology providers is currently looking for a Full Stack .NET Developer to join their team...  More
30+ days ago

Chicago, IL 60606 23-March-2017

Full Stack .Net Developer with MS dynamics
Source: Indeed
Details: (SDE with C#/ASP.Net/MVC, SQL Server, etc. - Microsoft stack) ~ Experience working with PCI compliant systems - examples: great plains or MS Dynamics  More
30+ days ago

Seattle, WA 02-March-2017
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisPin on Pinterest