
Domains
Agile Management
Master Agile methodologies for efficient and timely project delivery.
View All Agile Management Coursesicon-refresh-cwCertifications
Scrum Alliance
16 Hours
Best Seller
Certified ScrumMaster (CSM) CertificationScrum Alliance
16 Hours
Best Seller
Certified Scrum Product Owner (CSPO) CertificationScaled Agile
16 Hours
Trending
Leading SAFe 6.0 CertificationScrum.org
16 Hours
Professional Scrum Master (PSM) CertificationScaled Agile
16 Hours
SAFe 6.0 Scrum Master (SSM) CertificationAdvanced Certifications
Scaled Agile, Inc.
32 Hours
Recommended
Implementing SAFe 6.0 (SPC) CertificationScaled Agile, Inc.
24 Hours
SAFe 6.0 Release Train Engineer (RTE) CertificationScaled Agile, Inc.
16 Hours
Trending
SAFe® 6.0 Product Owner/Product Manager (POPM)IC Agile
24 Hours
ICP Agile Certified Coaching (ICP-ACC)Scrum.org
16 Hours
Professional Scrum Product Owner I (PSPO I) TrainingMasters
32 Hours
Trending
Agile Management Master's Program32 Hours
Agile Excellence Master's ProgramOn-Demand Courses
Agile and ScrumRoles
Scrum MasterTech Courses and Bootcamps
Full Stack Developer BootcampAccreditation Bodies
Scrum AllianceTop Resources
Scrum TutorialProject Management
Gain expert skills to lead projects to success and timely completion.
View All Project Management Coursesicon-standCertifications
PMI
36 Hours
Best Seller
Project Management Professional (PMP) CertificationAxelos
32 Hours
PRINCE2 Foundation & Practitioner CertificationAxelos
16 Hours
PRINCE2 Foundation CertificationAxelos
16 Hours
PRINCE2 Practitioner CertificationSkills
Change ManagementMasters
Job Oriented
45 Hours
Trending
Project Management Master's ProgramUniversity Programs
45 Hours
Trending
Project Management Master's ProgramOn-Demand Courses
PRINCE2 Practitioner CourseRoles
Project ManagerAccreditation Bodies
PMITop Resources
Theories of MotivationCloud Computing
Learn to harness the cloud to deliver computing resources efficiently.
View All Cloud Computing Coursesicon-cloud-snowingCertifications
AWS
32 Hours
Best Seller
AWS Certified Solutions Architect - AssociateAWS
32 Hours
AWS Cloud Practitioner CertificationAWS
24 Hours
AWS DevOps CertificationMicrosoft
16 Hours
Azure Fundamentals CertificationMicrosoft
24 Hours
Best Seller
Azure Administrator CertificationMicrosoft
45 Hours
Recommended
Azure Data Engineer CertificationMicrosoft
32 Hours
Azure Solution Architect CertificationMicrosoft
40 Hours
Azure DevOps CertificationAWS
24 Hours
Systems Operations on AWS Certification TrainingAWS
24 Hours
Developing on AWSMasters
Job Oriented
48 Hours
New
AWS Cloud Architect Masters ProgramBootcamps
Career Kickstarter
100 Hours
Trending
Cloud Engineer BootcampRoles
Cloud EngineerOn-Demand Courses
AWS Certified Developer Associate - Complete GuideAuthorized Partners of
AWSTop Resources
Scrum TutorialIT Service Management
Understand how to plan, design, and optimize IT services efficiently.
View All DevOps Coursesicon-git-commitCertifications
Axelos
16 Hours
Best Seller
ITIL 4 Foundation CertificationAxelos
16 Hours
ITIL Practitioner CertificationPeopleCert
16 Hours
ISO 14001 Foundation CertificationPeopleCert
16 Hours
ISO 20000 CertificationPeopleCert
24 Hours
ISO 27000 Foundation CertificationAxelos
24 Hours
ITIL 4 Specialist: Create, Deliver and Support TrainingAxelos
24 Hours
ITIL 4 Specialist: Drive Stakeholder Value TrainingAxelos
16 Hours
ITIL 4 Strategist Direct, Plan and Improve TrainingOn-Demand Courses
ITIL 4 Specialist: Create, Deliver and Support ExamTop Resources
ITIL Practice TestData Science
Unlock valuable insights from data with advanced analytics.
View All Data Science Coursesicon-dataBootcamps
Job Oriented
6 Months
Trending
Data Science BootcampJob Oriented
289 Hours
Data Engineer BootcampJob Oriented
6 Months
Data Analyst BootcampJob Oriented
288 Hours
New
AI Engineer BootcampSkills
Data Science with PythonRoles
Data ScientistOn-Demand Courses
Data Analysis Using ExcelTop Resources
Machine Learning TutorialDevOps
Automate and streamline the delivery of products and services.
View All DevOps Coursesicon-terminal-squareCertifications
DevOps Institute
16 Hours
Best Seller
DevOps Foundation CertificationCNCF
32 Hours
New
Certified Kubernetes AdministratorDevops Institute
16 Hours
Devops LeaderSkills
KubernetesRoles
DevOps EngineerOn-Demand Courses
CI/CD with Jenkins XGlobal Accreditations
DevOps InstituteTop Resources
Top DevOps ProjectsBI And Visualization
Understand how to transform data into actionable, measurable insights.
View All BI And Visualization Coursesicon-microscopeBI and Visualization Tools
Certification
24 Hours
Recommended
Tableau CertificationCertification
24 Hours
Data Visualization with Tableau CertificationMicrosoft
24 Hours
Best Seller
Microsoft Power BI CertificationTIBCO
36 Hours
TIBCO Spotfire TrainingCertification
30 Hours
Data Visualization with QlikView CertificationCertification
16 Hours
Sisense BI CertificationOn-Demand Courses
Data Visualization Using Tableau TrainingTop Resources
Python Data Viz LibsCyber Security
Understand how to protect data and systems from threats or disasters.
View All Cyber Security Coursesicon-refresh-cwCertifications
CompTIA
40 Hours
Best Seller
CompTIA Security+EC-Council
40 Hours
Certified Ethical Hacker (CEH v12) CertificationISACA
22 Hours
Certified Information Systems Auditor (CISA) CertificationISACA
40 Hours
Certified Information Security Manager (CISM) Certification(ISC)²
40 Hours
Certified Information Systems Security Professional (CISSP)(ISC)²
40 Hours
Certified Cloud Security Professional (CCSP) Certification16 Hours
Certified Information Privacy Professional - Europe (CIPP-E) CertificationISACA
16 Hours
COBIT5 Foundation16 Hours
Payment Card Industry Security Standards (PCI-DSS) CertificationOn-Demand Courses
CISSPTop Resources
Laptops for IT SecurityWeb Development
Learn to create user-friendly, fast, and dynamic web applications.
View All Web Development Coursesicon-codeBootcamps
Career Kickstarter
6 Months
Best Seller
Full-Stack Developer BootcampJob Oriented
3 Months
Best Seller
UI/UX Design BootcampEnterprise Recommended
6 Months
Java Full Stack Developer BootcampCareer Kickstarter
490+ Hours
Front-End Development BootcampCareer Accelerator
4 Months
Backend Development Bootcamp (Node JS)Skills
ReactOn-Demand Courses
Angular TrainingTop Resources
Top HTML ProjectsBlockchain
Understand how transactions and databases work in blockchain technology.
View All Blockchain Coursesicon-stop-squareBlockchain Certifications
40 Hours
Blockchain Professional Certification32 Hours
Blockchain Solutions Architect Certification32 Hours
Blockchain Security Engineer Certification24 Hours
Blockchain Quality Engineer Certification5+ Hours
Blockchain 101 CertificationOn-Demand Courses
NFT Essentials 101: A Beginner's GuideTop Resources
Blockchain Interview QsProgramming
Learn to code efficiently and design software that solves problems.
View All Programming Coursesicon-codeSkills
Python CertificationInterview Prep
Career Accelerator
3 Months
Software Engineer Interview PrepOn-Demand Courses
Data Structures and Algorithms with JavaScriptTop Resources
Python TutorialWeb Development
4.6 Rating 20 Questions 15 mins read12 Readers

ASP.NET Web API is a framework provided by the Microsoft open source technology for building and consuming HTTP based services on top of .NET Framework. The advantage of Web API is that it can be consumed by a broader range of clients including web browser and mobile applications, IoT etc. ASP.NET Web API provides an ideal platform for building RESTful applications on the .NET Framework. So there will be a client server communication using HTTP protocol.
HTTP (Hypertext Transfer Protocol) is an application level protocol that is used to deliver data such as html files, image files, query results, etc. on the World Wide Web. HTTP is a stateless protocol, meaning that after one cycle of request and response the server forgets everything about the cycle, and it considers another request from the same client as a new request from a new client.
Below is a simple Client-Server architecture of HTTP protocol

Using ASP.NET Web API, we can create non-SOAP based services like plain XML or JSON strings, etc. with many other advantages including:

The clients which support HTTP verbs such as GET, PUT, DELETE, POST consume WebAPI services. As WebAPI services are very easy to consume by any client because they don’t need any configuration. Portable devices like Mobile devices, IoT can easily consume WebAPI which is certainly the biggest advantages of this technology.
This is frequently asked in Web API interview questions.
URI is a string of characters used to identify a resource on the internet either by location or by name, or by both. URI stands for Uniform Resource Identifier.
URI is used to identify resources, for example, in the real world assume there is a person named “Test Person” who lives in “403, Test City, World”. We can find that person by address or by name or by both.
URI can be categorized into 2 as URL and URN
URI is used to send requests to the server. This can be achieved with the help of both URN and URL. Using URN is inefficient, as there can be many resources with the same name. So the most widely used method is URL. URL consists of two required components The Protocol & The Domain.
Look at the following URL:
http://www.testname.net/asp-net-webapi
Here the red colored part is the protocol and the black colored part is the domain, other parts are optional. It may contain the port/path/query strings/fragments.
Expect to come across this popular question in Web API c# interview questions.
There are various types of HTTP methods and they can be used according to the requirements. These methods are case-sensitive and they must used in uppercase.
Among these methods GET/PUT/POST/DELETE are the most popular methods.
HTTP Status Codes are the 3 digit integers which contain in server response. There is a meaning for each number. Response Header of each API response contains the HTTP Status Code. The first digit of the Status-Code defines the class of response. HTTP Status Codes are grouped into five categories based upon the first number.
Following are the set of status codes with its meaning:
Some of the commonly seen HTTP Status Codes are: 200 (Request is Ok), 201 (Created), 202 (Accepted), 204 (No Content), 301 (Moved Permanently), 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 500 (Internal Server Error), 502 (Bad Gateway), 503 (Service Unavailable) etc.
HTTP header fields are components of the header section of request or response messages in the Hypertext Transfer Protocol. It defines the operating parameters of an HTTP transaction. There are more contents in an HTTP header field.
For example, HTTP request to fetch aspnetwebapi.htm page from the web server running on developmenthelp.net.
A must-know for anyone heading into Web API interview, this is frequently asked in Web API interview questions.
Media Type is a file identification mechanism on the MIME encoding system, formerly “MIME type”. The Internet media type has become the de facto standard for identifying content on the Internet.
For example, consider an instance of receiving an email from a server with an attachment, the server embeds the media type of the attachment in the message header. So, the browser can launch the appropriate helper application or plug-in.
It's no surprise that this one pops up often in Web API scenario based interview questions.
It is difficult to say which one is better between Web API and WCF Rest service. Both the technologies have their own significant in the context of development, hosting and consuming the service.Although both WCF REST and ASP.NET Web API follow the REST architecture, these have the following differences:
WCF Rest
Web API
| WCF REST | ASP.NET Web API | |
|---|---|---|
| 1 | “WebHttpBinding” to be used for creating WCF RestFul services. | WebAPI Supports full features of HTTP. |
| 2 | HTTP Methods are mapped to attributes for example GET for WebGet and POST for WebInvoke. | It possible to host Web API in IIS as well as in an application. |
REST or Representational State Transfer is an architectural style for designing applications. Instead of using complex mechanisms like CORBA, RPC or SOAP for communication, it dictates that HTTP should be used.
There are a few principles associated with REST architectural style:
RESTFUL: It is a term written by applying REST architectural concepts and is called RESTful services. It focuses on system resources and how the state of the resource should be transported over HTTP protocol.
A staple in Web API interview questions for experienced, be prepared to answer this one.
It completely depends upon the requirement. Choose ASP.NET Web API if you want HTTP based services only, as Web API is a lightweight architecture and is good for the devices which have limited bandwidth. We can also create the REST services with WCF, but that requires a lot of configuration. In case you want a service that should support multiple transport protocols like HTTP, UDP, TCP, etc. then WCF will be the better option.
This is a regular feature in Web API interview questions, be ready to tackle it.
WCF
Web API
MVC
REST stands for Representational State Transfer. This term was coined by Roy Fielding in 2000. RESTful is an Architectural style for creating loosely coupled applications over HTTP. In order to make API to be RESTful, it must adhere to the around 6 constraints that are mentioned below:
This constraint specifies that a Client sends a request to the server and the server sends a response back to the client. This separation of concerns supports the independent development of both client-side and server-side logic. That means client application and server application should be developed separately without any dependency on each other. A client should only know resource URIs and that’s all. Severs and clients may also be replaced and developed independently as long as the interface between them is not altered.
The stateless constraint specifies that the communication between the client and the server must be stateless between requests. This means that we should not be storing anything on the server related to the client. The request from the client should contain all the necessary information for the server to process that request. This ensures that each request can be treated independently by the server.
The uniform interface constraint defines an interface between the client and the server. To understand the uniform interface constraint, we need to understand what a resource is and the HTTP verbs – GET, PUT, POST and DELETE. In the context of a REST API, resources typically represent data entities. The product, Employee, Customer, etc. are all resources. The HTTP verbs (GET, PUT, POST, and DELETE) that are sent with each request tell the API what to do with the resource. Each resource is identified by a specific URI (Uniform Resource Identifier).
Some data provided by the server like the list of products, or list of departments in a company does not change that often. This constraint lets the client know how long this data holds good, so that the client does not have to come back to the server for that data over and over again.
This is frequently asked in Web API interview questions for experienced.
We can unit test the Web API using the Fiddler tool. Below are the settings to be done in Fiddler –Compose Tab -> Enter Request Headers -> Enter the Request Body and execute.