WEBAPI tagged Questions - Page 1 webapi interview questions

What is a Web API?
Web API is a framework that helps us to build HTTP services. That helps other systems to use your business logic. It allow two way communication between client and server. It has very similar feature like ASP.NET MVC.

What is REST?
REST abbreviation of Representational state transfer. It is stateless architecture that runs over http but not tied to specific protocol. REST architecture have lightweight designs. REST use HTTP protocol for CRUD Operation.

Explain routing in Web API?
Following code shows default route.

    Name: “API Default”,
    routeTemplate: “api/{controller}/{id}
    defaults: new { id = RouteParameter.Optional}

What are the Advantages using WebAPI?
Web API enables developers to get business data by using REST. It has complete support of routing. It has support for OData. Web API Obtain result In JSON and XML format using MediaTypeFormatter. It uses the HTTP verbs (GET, POST, PUT and DELETE) for CRUD operation.

What is the key benefit of using REST with Web APIs?
REST helps minimize data transfers between the client and server, thereby making it ideal for mobile applications. Web API provides the framework for developers to build API with a lot less effort.

Developers can use REST for communication between server and mobile applications.For applications with complex interactions, developers can use Windows Communication Foundation (WCF), instead of REST, because WCF supports additional functionalities such as sending attachments.

What is the syntax that the ASP.NET MVC engine uses for mapping controllers and action functions?
The syntax is as follows:
http://<hostname>/api/<entity name>/<parameters>

What is the key benefit of using the JSON.NET library?
The JSON.NET library helps deserialize the results from the Web API into .NET objects.

where is the proxy in WebAPI?
Web API doesn't make it easy for consumers to generate a service client like a SOAP WSDL does. If you're only ever going to have .NET clients it's not a big deal because they can share the contract objects you implement, but other language clients will need to manually create their client objects if you don't use SOAP.

What are the Advantages using WebAPI?
  1. OData support (via Queryable attribute)
  2. Content Negotiation
  3. Filters
  4. Model binding and validation
  5. Ability to self host outside of IIS
  6. Link generation to related resources that incorporates routing rules
  7. Full support for routes/routing
  8. Ability to create custom help and test pages using IApiExplorer

What is the advantage of WebAPI over WCF with REST?
  1. WCF was brought in to implement SOA, never the intention was to implement REST.
  2. WebAPI is built from Scratch and the only goal is to create HTTP services using REST.

Wells fargo .net interview questions


What is encapsulation? Benifits? where we using? how we using?

virtual keyword usage with example?

static class usage and purpose with example?


scenario question

1.static class scope? when it get initailized

2.Is there any way to dispose the static class in the middle of the time? is this possible


if there is no Default Contructor what will happen

which design pattern using in you current / existing project? Explanation

SOLID principles in C#

class and object, abstract class, interface and inheritance




How we handle Routing in MVC


1. if we dont put the default routing what will happen?

2. if we mention only the controller name alone but not the action in routing what will happen

Authorization and Authentication in MVC



1. what kind of authentication are you using in your application

2. if you using Azure Active Directory Authentication , tell the steps

3. Authrorize attribute, can we put this attribute in global instead of action or controller, is it possible?

Error Handling in MVC

1. can we set the error handling class as common [attribute] to the application level instead of putting try catch block in each methods in the controller

2. display the value in controller level - viewbag, viewdata and tempdata


Web API 

HTTP verb

Web API authentication



What is CTE in SQL Server?

basic commands like inner join, functions and sp

Current Project explanation

Similar Tags