Top ASP.NET Web API Interview Questions

Asp.Net Web API
  1. What is ASP.NET Web API
  2. What are the Advantages of Using ASP.NET Web API
  3. What is the difference between Api Controller and MVC Controller?
  4. What are various return types supported in Web API?
  5. How to Restrict Access to Web API Method to Specific HTTP Verb?
  6. What is Rest?
  7. What’s the difference between REST & RESTful?
  8. Why are the “FromBody” and “FromUri” attributes needed in ASP.NET Web API`?
  9. Explain briefly CORS(Cross-Origin Resource Sharing)?
  10. Can we use Web API with ASP.NET Web Form? 
  11. How to Return View from ASP.NET Web API Method?
  12. How Can We Provide an Alias Name for ASP.NET Web API Action?
  13.  Explain Web API Routing?
  14. How we can handle errors in Web API?
  15. Write a code snippet to register exception filters from action?
  16. Write a code snippet to register exception filters from controller?
  17. How to handle error using HttpError?
  18. Write a code snippet to register exception filters globally?
  19. Write a code snippet to show how we can return 404 error from HttpError?
  20. How to enable tracing in ASP.NET Web API?
  21. Can we do unit testing in Web API?
  22. Explain ASP.NET Identity?
  23. What are Authentication Filters in Web API?
  24. What are media types?
  25. What is Content Negotiation in WebAPI?
  26. What is DelegatingHandler in Web API?
  27. What are the various return types in ASP.Net Web API?
  28. Difference between Http Get vs Http Post?
  29. How to make sure that Web API returns in JSON format data only?
  30. How to give Alias name for an action method in Web API?
  31. How to host ASP.NET Web API?
  32. How to consume Web API using HttpClient?
  33. How to Enable HTTPS in Web API?
  34. How to implement Basic Authentication in ASP.Net Web API?
  35. How to to return an image with Web API Get method?

Leave a Reply

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

© 2022 .Net FAQs' - WordPress Theme by WPEnjoy