Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What replaced HttpOperationHandler in WCF Web API to ASP.NET Web API

In upgrading an old project that was built using WCF Web API to now use ASP.NET Web API, I have run into a few classes that implement HttpOperationHandler<HttpRequestMessage, T>. I'm unable to find an equivalent class in the new assemblies. Does something similar exist or will I need a different approach?

like image 541
Chris Missal Avatar asked Dec 05 '12 16:12

Chris Missal


People also ask

Does ASP Net Web API replace the WCF?

No, it's not true that ASP.NET Web API has replaced WCF. WCF was generally developed to develop SOAP-based services. ASP.NET Web API is a new way to develop non-SOAP-based services such as XML, JSON, etc.

What is the difference between WCF and the Asp Net Web API service?

Use WCF to create reliable, secure web services that are accessible over a variety of transports. Use ASP.NET Web API to create HTTP-based services that are accessible from a wide variety of clients. Use ASP.NET Web API if you are creating and designing new REST-style services.

Why use ASP Net Web API instead of WCF which suits better?

WEB API is a better choice for simpler, light weight services. WEB API can use any text format including XML and is faster than WCF. WEB API can be used to create full-blown REST Services. WEB API doesn't require any data contracts and doesn't require configurations to the level of WCF.

What is difference between WCF and Web API and WCF REST and Web service?

WCF is used for developing SOAP-based services whereas Web API is used for both SOAP-based and RESTful services. WCF does not offer any support for MVC features whereas Web API supports MVC features. WCF supports HTTP, UDP, and custom transport protocol whereas Web API supports only HTTP protocol.


1 Answers

The concept of Operation handlers has been replaced with Filters and model binders.

Here are some links that you might find useful:

  • How to Migrate from WCF Web API to ASP.NET Web API
  • Mike's blog on How WebAPI does Parameter Binding
  • Getting started tutorials on ASP.NET WebAPI page.

Hope this helps.

like image 113
Maggie Ying Avatar answered Sep 19 '22 07:09

Maggie Ying