Skip to content

Desi banjara

  • “Talk to yourself like you would to someone you love.” Brené Brown Motivational & Inspirational Quotes
  • Interview question: What is the purpose of “is” operator in C#? C# development
  • “Obstacles don’t have to stop you. If you run into a wall, don’t turn around and give up. Figure out how to climb it, go through it, or work around it.” – Michael Jordan Motivational & Inspirational Quotes
  • Inspirational Quotes – I’ve missed more than 9000 shots in my career Inspirational Quotes
  • 75 Best inspiring quotes on Leadership Business
  • Family Quotes – The strength of a nation derives from the integrity of the home Family Quotes
  • Happy birthday, On this special day May gladness fill Your every hour With joy to light your way. Birthday Wishes
  • “I ask not for a lighter burden, but for broader shoulders.”– Jewish Proverb Motivational & Inspirational Quotes

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 questions – Microsoft Word Interview questions
  • Interview question: What is encapsulation? C# development
  • Differences between struct and classes in C# : Interview question C# development
  • Interview question: What are primitive data types in C#? C# development
  • Interview question: What is the difference between dynamic type variables and object type variables? C# development
  • Interview question: Can you return multiple values from a function 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
  • “Nobody can discover the world for somebody else. Only when we discover it for ourselves does it become common ground and a common bond and we cease to be alone.” – Wendell Berry Quotes
  • Microsoft AZ-900 Certification Exam Practice Questions – 6 Microsoft AZ-900 Certification Exam
  • “Pride is holding your head up when everyone around you has theirs bowed. Courage is what makes you do it.” Bryce Courtenay Motivational & Inspirational Quotes
  • “If you hear a voice within you say ‘you cannot paint’, then by all means paint, and that voice will be silenced.” Vincent Van Gogh Motivational & Inspirational Quotes
  • “I travel a lot; I hate having my life disrupted by routine.” – Caskie Stinnett Quotes
  • Interview question: In how many ways you can pass parameters to a method? C# development
  • Sample Exam Questions 7: AZ-300: Microsoft Azure Architect Technologies AZ-300: Microsoft Azure Architect Technologies Exam
  • AWS DevOps Engineer Professional Exam Practice Questions – 13 AWS DevOps Engineer Professional Exam

Copyright © 2022 Desi banjara.

Powered by PressBook News WordPress theme