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

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. https://www.youtube.com/watch?v=FUa8RzWpJI0Video can’t be loaded because JavaScript is disabled: Creating a Windows Service with Topshelf (https://www.youtube.com/watch?v=FUa8RzWpJI0) 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

How to Self Host ASP.NET Web Api

Over the past several months, I’ve talked to a few people that were completely unaware that you could self host ASP.NET Web Api application without the need for IIS. Anyone who has worked with IIS knows that sometimes it can feel a bit heavy.  Especially if you not using any other features other than serving static content or executing your ASP.NET Web Api. There are a couple important aspects to cover first which are what makes self hosting possible. If you have any questions, please follow me on Twitter. OWIN OWIN defines a standard interface between .NET web servers and web applications. The… Read More »How to Self Host ASP.NET Web Api