Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.

Follow @CodeOpinion

How-To Create Katana Middleware

What I love about Katana (OWIN Implementation) is the ability to add functionality through the request pipeline.  In this post I’m going to extend my ASP.NET Self Host Web Api application by demonstrating how you can create your own Katana Middleware. What’s OWIN Middleware? OWIN specification defines middleware as: Middleware – Pass through components that form a pipeline between a server and application to inspect, route, or modify request and response messages for a specific purpose. Katana IAppBuilder.Use There are couple different ways you can create your own middleware.  The simplest is to call the IAppBuild.Use method in your Startup class. For our example,… Read More »How-To Create Katana Middleware

ASP.NET Self Host Static File Server

Continuing in my Owin and Katana series of blog posts, I’m going to demo an ASP.NET Self Host Static File Server. If you have not seen my previous posts in this series, I’ve covered how to self host a Web Api application and how to use Topshelf to debug and run as a windows service. The wonderful thing about the shift to Owin and Katana with ASP.NET is middleware. Katana has a file server implementation that you can plugin to your application startup pipeline in order to serve static files either on a filesystem or from embedded resources. Middleware The first… Read More »ASP.NET Self Host Static File Server

Self Host ASP.NET Web Api as a Windows Service

In my previous blog I demonstrated how to Self Host ASP.NET Web API, which was a very basic console application leveraging Owin and Katana. The next step in this series is how to turn your console application into a Windows service. If you have any questions, please follow me on Twitter. Video If you prefer a video tutorial, here is one I published to YouTube outlining a similar example as on this post. can’t be loaded because JavaScript is disabled: Creating a Windows Service with Topshelf ( Windows Service Template The typical way to create a Windows Service is by using… Read More »Self Host ASP.NET Web Api as a Windows Service