Tag Archives: TopHeaderMenu
MessageHandlers and service Versions in Web API
The article demonstrates how different versions of the same service could be supported or not in a web API. Underneath are good links of different possibilities, which are better for different business scenarios. Depending on the client application/implementation, an update strategy could be implemented using Message Handlers. Code: https://github.com/damienbod/WebAPIVersioningAnd-MessageHandlers Possibility One: The old version of […]
Data Transfers With Web API Batching and Protobuf
This article demonstrates how to setup up a Web API service which supports default batching as well as a custom Protobuf batch handler. Protobuf is used because it is the fastest and best serialization library which exists for .NET applications. CRUD operations are supported. Batching can be used to send multiple requests in a single […]
Using Web API with a Nest elasticsearch backend
This article demonstrates how to create a Web API RESTful service and use Elasticsearch as the persistence infrastructure. Nest is used to access Elasticsearch store. Simple CRUD is supported in the controller. code: https://github.com/damienbod/WebAPIRestWithNest Update 2014.09.28: updated all NuGet packages and fixed NEST, breaking changes in version 1 Structure The Application structure is based on […]
Exploring Web API Exception Handling
In this article, exception handling is explored for Web API. The standard features from Web API 2 are shown as well as the global exception handling released in version 2.1. code: https://github.com/damienbod/WebApi2_1ExceptionHandling Using the HttpResponseException class The following two examples demonstrates how the HttpResponseException class can be used in simple action methods. The HttpStatusCode enum […]
Using Protobuf-Net Media Formatter with Web API 2
The example shows how to setup a Web API 2 service using Protobuf-Net as it Media Formatter and a HttpClient which gets and deserializes the response using Protobuf-Net. Protobuf is choosen because it’s the fastest Media Formatter at present. Code: https://github.com/damienbod/WebApi2WebApiContribProtobuf Web API 2 Server The server is just a basic Web API MVC 5 […]
Self Hosted Web Api using Owin and Unity, Nuget Package Documentation
This is the documentation for the nuget package Unity.SelfHostWebApiOwin. The package is dependent on Katana 2. The code can be found here: Example, how to use: https://github.com/damienbod/HelloWorldUnityWithSelfHostedOwin Source code: https://github.com/damienbod/SelfHostWebApiWithOwinAndUnityUsingNuget How to create an application using the nuget package: Step 1: Create a Console application. This will be used to start the application or could […]
SelfHost WebApi with Owin and unity using a Nuget package
This post continues in from the previous blog Self Host WebApi with Owin and Unity The blog project and nuget package can be downloaded from here: nuget: https://www.nuget.org/packages/Unity.SelfHostWebApiOwin code: https://github.com/damienbod/SelfHostWebApiWithOwinAndUnityUsingNuget In this blog, a nuget packet will be created, so unity can be used with a self hosted web Api easily. What is required in […]
AOP with ASP.NET Web Api
This blog demonstrates the usage of filters and unity interface interception with an ASP.NET Web Api application. AOP = Aspect oriented programming. This programming paradigm can be used to add functionality to existing methods. In the following example, we wrap the controller method with diagnosis using filters and then we wrap the business manager with […]
