Skip to content

Desi banjara

  • Happy birthday to the person who is charming, witty and a lot like myself. Birthday Wishes
  • Microsoft AZ-900 Certification Exam Practice Questions – 6 Microsoft AZ-900 Certification Exam
  • A birthday bouquet of words I send to you – May the days ahead be bright and colorful Full of joy, happiness and friendship May you continue to be Such an uplifting and positive force in so many people’s lives And may your year ahead Be blessed and happy – Always. Birthday Wishes
  • “Tough times never last, but tough people do.”– Robert H Schuller Motivational & Inspirational Quotes
  • Even when I don’t see you, the thought of you makes me feel loved. Often, I catch myself doing something right and realize that it was you who taught me to do it. I owe so much to you, Mom! Happy birthday Birthday Wishes For Mom
  • Sample Exam Questions 1: AZ-300: Microsoft Azure Architect Technologies AZ-300: Microsoft Azure Architect Technologies Exam
  • “Have great hopes and dare to go all out for them. Have great dreams and dare to live them. Have tremendous expectations and believe in them.”– Norman Vincent Peale Motivational & Inspirational Quotes
  • AWS DevOps Engineer Professional Exam Practice Questions – 8 AWS DevOps Engineer Professional Exam

Asp.Net WebApi Interview Questions – Cont.

No Comments on Asp.Net WebApi Interview Questions – Cont.

Interview Questions 16 – What is the benefit of using REST in WebAPI?

REST is used to make fewer data transfers between client and server which make it an ideal for using it in mobile apps. WebAPI also supports HTTP protocol. Therefore, it reintroduces the traditional way of the HTTP verbs for communication.

Interview Questions 17 – Tell me the code snippet to show how we can return 404 errors from HttpError?

Code for returning 404 error from HttpError

string message = string.Format(“user id = {0} not found”, userid);

return Request.CreateErrorResponse(HttpStatusCode.NotFound, message);

 

Interview Questions 18 – What is the differences between MVC and WebAPI

MVC framework is used for developing applications which have User Interface. For that, views can be used for building a user interface.

WebAPI is used for developing HTTP services. Other apps can also be called the WebAPI methods to fetch that data.

 

Interview Questions 19 – What is the benefit of WebAPI over WCF?

WCF services use the SOAP protocol while HTTP never use SOAP protocol. That’s why WebAPI services are lightweight since SOAP is not used. It also reduces the data which is transferred to resume service. Moreover, it never needs too much configuration. Therefore, the client can interact with the service by using the HTTP verbs.

Interview Questions 20 – What is the usage of DelegatingHandler?

DelegatingHandler is used in the Web API to represent Message Handlers before routing.

Interview Questions 21 – How can we use Web API with ASP.NET Web Form?

WebAPI can be used with ASP.NET Web Form

It can be performed in three simple steps:

  1. Create a Web API Controller,
  2. Add a routing table to ApplicationStart method of Global.asax
  3. Then you need to make a jQuery AJAX Call to Web API method and get data.

Interview Questions 22 – How to you can limit Access to Web API to Specific HTTP Verb?

Attribute programming plays an important role. It is easy to restrict access to an ASP.NET Web API method to be called using a particular HTTP method.

Interview Questions 23 – How can assign alias name for ASP.NET Web API Action?

We can give alias name for Web API action same as in case of ASP.NET MVC by using “ActionName” attribute as follows:

 

 

 

 

 

 

 

[HttpPost]

 

[ActionName(“DeleteUser”)]

 

public void DeleteUserData(User user)

{

UserRepository.DeleteUser (user);

}

 

Interview Questions 24 – How can you handle errors in Web API?

Several classes are available in Web API to handle errors. They are HttpError, Exception Filters, HttpResponseException, and Registering Exception Filters.

Interview Questions 25 – What New Features comes with ASP.NET Web API 2.0?

The latest features of ASP.NET WebAPI framework v2.0 are as follows:

  • Attribute Routing
  • Cross-Origin Resource Sharing
  • External Authentication
  • Open Web Interface NET
  • HttpActionResult
  • Web API OData

Asp.Net WebApi Interview Questions

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

Post navigation

Previous Post: Asp.Net WebApi Interview Questions
Next Post: C# interview Questions – What is struct in C#?

Related Posts

  • Interview question: What is boxing and Unboxing in C#? C# development
  • Interview question: What is the use of “using” keyword in C#? C# development
  • Interview question: What is the difference between GetType() and typeof()? C# development
  • How to enable cors in WebApi to handle request from different subdomains? ASP.NET Web API
  • Interview question: Can you return multiple values from a function in C#? C# development
  • C# Interview question: How encapsulation is implemented in C#? C# development

Leave a Reply Cancel reply

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



Archives

  • 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
  • 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
  • Uncategorised
  • Uplifting Quotes
  • WCF (Windows Communication Foundation)
  • Web development
  • Wishes
  • Wishes for Newborn Baby

Meta

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



Recent Posts

  • PL-200: Microsoft Power Platform Functional Consultant Certification – Exam Practice Questions
  • SonarQube – Static code analysis
  • Microsoft PL-900 Certification Exam Practice Questions – 2
  • Microsoft AZ-204 Certification Exam Practice Questions – 1
  • AWS DevOps Engineer Professional Exam Practice Questions – 14

Recent Comments

  • Yosianus on Error while sending json model in POST request to web API service using postman
  • Microsoft Exam AZ-400 Certification Exam Practice Questions – 1 Uncategorised
  • “Always remember you are braver than you believe, stronger than you seem, and smarter than you think.” Christopher Robin Motivational & Inspirational Quotes
  • 100+ Facebook/WhatsApp I Miss You Messages I Miss You Messages
  • Interview question: What are the two types of data type in C#? C# development
  • “Courage doesn’t always roar. Sometimes courage is the quiet voice at the end of the day, saying, “I will try again tomorrow.”– Mary Anne Radmacher Motivational & Inspirational Quotes
  • How to take a screenshot in Google Nexus? Android phones
  • Interview questions – Microsoft Excel Interview questions
  • Love Quotes – lack of friendship that makes unhappy marriages Love Quotes

Copyright © 2022 Desi banjara.

Powered by PressBook News WordPress theme