Skip to content

Desi banjara

  • Microsoft AI-900 Certification Exam Practice Questions Microsoft AI-900 Certification Exam
  • Microsoft SQL Server – 50+ useful Sql query SQL
  • “To my mind, the greatest reward and luxury of travel is to be able to experience everyday things as if for the first time, to be in a position in which almost nothing is so familiar it is taken for granted.” – Bill Bryson Quotes
  • I celebrate this special day for a special someone who is the source of inspiration and guiding light for the entire family. Happy birthday dear mom! Birthday Wishes For Mom
  • How to take a screenshot on Google (Android) phones? Android phones
  • Wishing the day is as amazing as you are. A very Happy Birthday buddy. Birthday Wishes
  • I believe in angles I believe in superheros I believe in miracles I believe in blessings I believe in good luck I believe in destiny I find all these in my Mom Who is my everything Happy Birthday Birthday Wishes For Mom
  • Birthday messages for Girlfriend Best Wishes Messages

Asp.Net WebApi Interview Questions

Posted on August 21, 2018 By DesiBanjara No Comments on Asp.Net WebApi Interview Questions

Asp.Net WebApi Interview Questions

 

Interview Questions 1 – Explain what is REST and RESTFUL?

Representational State Transfer (REST) is an architectural style that defines a set of constraints to be used for creating web services and APIs. It has defined guidelines for creating services which are scalable. REST used with HTTP protocol using its verbs GET, PUT, POST and DELETE.

RESTFUL is referred for web services/ WebApi written by applying REST architectural concept. It focuses on system resources and how state of resource should be transported over HTTP protocol to different clients written in different language. In RESTFUL web service/API HTTP methods like GET, POST, PUT and DELETE can be used to perform CRUD operations.




Interview Questions 2 – What is ASP.NET WebAPI?

ASP.NET WebAPI is a framework which helps developers to build HTTP services for broader range of clients including web browsers as well as mobile devices on top of .NET Framework.

Using ASP.NET Web API, we can create non-SOAP based services.




Interview Questions 3 – What are the Advantages of Using ASP.NET WebAPI?

The advantages of using ASP.NET Web API are:

  • Create resource-oriented services using the full features of HTTP
  • Exposing services to a variety of clients easily like browsers or mobile devices, etc.
  • It works the HTTP way using standard HTTP verbs like GET, POST, PUT, DELETE, etc. for all CRUD operations
  • Complete support for routing
  • Response generated in JSON or XML format using MediaTypeFormatter
  • It has the ability to be hosted in IIS as well as self-host outside of IIS
  • Supports Model binding and Validation
  • Filters
  • Web API encourages TDD (Test Data Driven) approach in the development of RESTful services.

Interview Questions 4 – Why select WebAPI?

  • It is used to create simple, non-SOAP-based HTTP Services
  • It is based on HTTP and easy to define, expose and consume in a REST-ful way.
  • It is lightweight architecture and ideal for devices that have limited bandwidth like smartphones.


Interview Questions 5 – Is it right that ASP.NET WebAPI has replaced WCF?

It’s a not at all true that ASP.NET Web API has replaced WCF. In fact, it is another way of building non-SOAP based services, i.e., plain XML or JSON string.




Interview Questions 6 – Mention what tools are required to test your web API?

SOAPUI tool for SOAP WS, Postman and Firefox “poster” plugin for RESTFUL services.




Interview Questions 7 – Mention what are the HTTP methods supported by REST?

HTTP methods supported by REST are:

  • GET: It requests a resource at the request URL. It should not contain a request body as it will be discarded. Maybe it can be cached locally or on the server.
  • POST: It submits information to the service for processing; it should typically return the modified or new resource
  • PUT: At the request URL it update the resource
  • DELETE: At the request URL it removes the resource
  • OPTIONS: It indicates which techniques are supported
  • HEAD: About the request URL it returns meta information

 Interview Questions 8 – What are main return types supported in Web API?

A Web API controller action can return following values:

  • Void – It will return empty content
  • HttpResponseMessage – It will convert the response to an HTTP message.
  • IHttpActionResult – internally calls ExecuteAsync to create an HttpResponseMessage
  • Other types – You can write the serialized return value into the response body





Interview Questions 9 – Web API supports which protocol?

Web API supports HTTP protocol.

Interview Questions 10 – Who can consume WebAPI?

WebAPI can be consumed by any client which supports HTTP verbs such as GET, PUT, DELETE, POST. As WebAPI services don’t need any configuration, they are very easy to consume by any client. Infract, even portable devices like Mobile devices can easily consume WebAPI which is certainly the biggest advantages of this technology.



Interview Questions 11 – Which .NET framework supports Web API?
NET 4.0 and above version supports web API.



Interview Questions 12 – Web API uses which of the following open-source library for JSON serialization?

Web API uses Json.NET library for JSON serialization.



Interview Questions 13 – By default, Web API sends HTTP response with which status code for all the uncaught exception?

500 – Internal Server Error




Interview Questions 14 – What is the biggest disadvantage of “Other Return Types” in Web API?

The biggest disadvantage of this approach is that you cannot directly return an error code like 404 error.

Interview Questions 15 – What is Web API Routing in Asp.Net WebApi?

Routing in Web API is pattern matching like in MVC. All routes are registered in Route Tables.

Asp.Net WebApi Interview Questions – Cont.




ASP.NET Web API, Interview questions, IT/Software development, Web development Tags:ASP.NET Web API, Interview questions, Web development

Post navigation

Previous Post: Top 20 beginner level C# interview questions
Next Post: Asp.Net WebApi Interview Questions – Cont.

Related Posts

  • WCF (Windows Communication Foundation) Interview questions ASP.NET Web API
  • Interview question: In how many ways you can pass parameters to a method? C# development
  • Interview question: Can we assign null value into value type variable? C# development
  • Interview question: What is the purpose of “as” operator in C#? C# development
  • Interview question: What is the difference between GetType() and typeof()? C# development
  • Differences between struct and classes in C# : Interview question C# development

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *



Archives

  • February 2023
  • February 2022
  • June 2021
  • March 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • December 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • January 2018
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • August 2015
  • May 2015
  • April 2014
  • November 2013

Categories

  • Acer
  • Amazon AWS Certification Exam
  • Amazon Kindle
  • Android phones
  • ASP.Net MVC
  • ASP.NET Web API
  • AWS DevOps Engineer Professional Exam
  • AZ-300: Microsoft Azure Architect Technologies Exam
  • Azure Active Directory
  • Azure App Services
  • Azure Data Factory
  • Azure Logic Apps
  • Azure Mobile Apps
  • Azure Virtual Machine
  • Best Wishes Messages
  • birthday messages for boyfriend
  • Birthday messages For Girlfriend
  • Birthday Wishes
  • Birthday Wishes For Mom
  • Business
  • C# development
  • Cameras
  • Canon
  • Cloud
  • Cloud services
  • digital-cameras
  • Diwali
  • Entrepreneurship
  • eReaders
  • Family Quotes
  • Family Quotes
  • Friendship Quotes
  • Gadgets
  • Games
  • Get Well Soon Messages
  • GIT
  • Good Morning Wishes
  • Google
  • Gratitude Quote
  • Guru Nanak Jayanti
  • Halloween
  • Happiness Quote
  • Happy Diwali Wishes
  • Happy Independence Day Wishes
  • Happy New Year Wishes
  • HTC
  • HTC One
  • HTML
  • I Miss You Messages
  • Inspirational Quotes
  • Inspirational Travel Quotes
  • Interview questions
  • IT/Software development
  • Leadership Quote
  • Life lessons
  • Love Quotes
  • Love shayari
  • Messages
  • Microsoft AI-900 Certification Exam
  • Microsoft AZ-104 Certification Exam
  • Microsoft AZ-204 Certification Exam
  • Microsoft AZ-900 Certification Exam
  • Microsoft Azure
  • Microsoft Azure certifications
  • Microsoft Exam AZ-220
  • Microsoft Excel
  • Microsoft Office
  • Microsoft word
  • Mobile phones
  • Motivational & Inspirational Quotes
  • Nature Quotes
  • Nexus
  • Nikon
  • Pixels
  • PL-200: Microsoft Power Platform Functional Consultant Certification
  • PL-900: Microsoft Power Platform Fundamentals
  • postman
  • Quotes
  • Robin Sharma
  • Samsung Galaxy S5
  • Self improvement quotes
  • Self-Confidence Quote
  • SonarQube
  • Sony PlayStation 4
  • SQL
  • SQL Server
  • Success Quotes
  • Travel Quotes
  • Uncategorized
  • Uplifting Quotes
  • WCF (Windows Communication Foundation)
  • Web development
  • Wishes
  • Wishes for Newborn Baby

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org



Recent Posts

  • Azure Data Factory
  • What is Azure Active Directory?
  • Azure Virtual Machine
  • Azure Logic Apps
  • Azure Mobile Apps

Recent Comments

  • Yosianus on Error while sending json model in POST request to web API service using postman
  • Happy birthday to the person who is charming, witty and a lot like myself. Birthday Wishes
  • ASP.NET MVC: How to show html data from database to front end view Uncategorized
  • Happy birthday to a special friend; who will be special till the end. Birthday Wishes
  • Interview question: How to sort an array in C#? C# development
  • Azure Mobile Apps Azure Mobile Apps
  • “The use of traveling is to regulate imagination with reality, and instead of thinking of how things may be, see them as they are.” – Samuel Johnson Quotes
  • AWS DevOps Engineer Professional Exam Practice Questions – 1 AWS DevOps Engineer Professional Exam
  • Interview question: What is the purpose of an access specifier in C#? C# development

Copyright © 2023 Desi banjara.

Powered by PressBook News WordPress theme