Asp.Net
ASP.NET Application & PAGE Life Cycle
In this tutorial, you will learn- What is ASP.Net Life cycle? What is ASP.Net Page Life cycle?...
WCF stands for Windows Communication Foundation. It is used to create a distributed and interoperable Applications. WCF is an effective platform for developing service-oriented applications. It allows developers to create secure, reliable, and high profile development solutions which can be integrated across platforms and interoperate with existing investments.
In this tutorial, you will learn
ASP.NET Web API is a framework which allows you to build HTTP services for browsers and mobile devices. It is an ideal platform for developing RESTful applications on the ASP .NET Framework.
The ASP.NET Web API is an extensible framework for building HTTP based services that can be accessed in different applications on different platforms such a web, windows, mobile devices, etc.
Here, are pros/benefits of using WCF:
Here, are pros/benefits of using web API:
| Parameter | WCF | Web API |
|---|---|---|
| Message Exchange Pattern | Request reply, one-way, or duplex. | By default request-reply only. However, additional message pattern can be supported with web sockets integration. |
| Hosting | IIS hosting, Self-hosting & works activation services. | Self-hosting & IIS hosting. |
| Open Source | It is not open source software. | It is shipped with.Net framework.It is also available as an independent download. |
| Support for MVC features | WCF does not provide any support for MVC features like controllers, routing, filter, auction results, etc. | ASP.NET Web API supports MVC features like routing, controllers, results, filter, action, etc. |
| Encoding support | Text, MTOM, and Binary. | Default support for UTF-8 encoding format. |
| Support for | Support for HTTP, UDP, and custom transport protocol. | Supports only HTTP protocol |
| Use of model | User attributed based programming model. | Maps HTTP verbs to methods |
| Configuration | Uses web.config and attributes to configure a HttpConfiguration class but not on the web.config Service. | Web API can be configured using web.config service. |
| RESTful services | It offers supports for RESTFUL service but with limitations. | Ideal for building RESTFUL services. |
Following is a quick checklist to help to determine whether to use WCF or Web API
| Scenario | WCF 4.5 | ASP.NET Web API |
|---|---|---|
| Requires support for scenarios like Message queues, end to end message security, duplex communication, distributed transactions, etc. | Select | Do NOT Select |
| When you already have existing working WCF services and Wants to add HTTP support additionally. | Select | Do NOT Select |
| One code base to provide support both SOAP and RESTful endpoints. | Select | Do NOT Select |
| Wants to create a resource-oriented service over HTTP. | Do NOT Select | Select |
| Your project is an MVC application and wants some functionality over HTTP. | Do NOT Select | Select |
| You want to build only an HTTP / RESTful services | Do NOT Select | Select |
In this tutorial, you will learn- What is ASP.Net Life cycle? What is ASP.Net Page Life cycle?...
What is ASP.Net? ASP.Net is a web development platform provided by Microsoft. It is used for...
Let's look at an example of how we can implement a simple "hello world" application. For this, we...
The HTTP protocol on which all web applications work is a stateless protocol. By stateless, it...
In any application, errors are bound to occur during the development process. It is important to...
In this tutorial, you will learn- Adding ASP.Net Controls to Web Forms Label Control Textbox List...