Language

Samples for working with OWIN and Katana

ASP.NET Routes Sample

ASP.NET Routes Sample

In some applications you will want to hook up OWIN components in the Asp.Net route table side by side with non-OWIN components. This sample shows how to use the RouteCollection extension methods MapOwinPath and MapOwinRoute provided by Microsoft.Owin.Host.SystemWeb.

Branching Pipelines Sample

Branching Pipelines Sample

OWIN request processing pipelines do not need to be linear, they can be branched to process requests in different ways. This sample shows how to construct a branching pipeline based on request paths or other request data such as headers. These components are available in the Microsoft.Owin.Mapping nuget package.

Custom Server Sample

Custom Server Sample

Throughout every layer of the architecture, Katana components are replaceable if the default implementations do not meet the requirements of the system. This principle applies even to the core infrastructure components such as the server. This sample shows how to create and run a custom OWIN server in a console host application.

Embedded Sample

Embedded Sample

Some OWIN servers can be run inside of your own process ("self-hosted"). This sample shows how to start an OWIN application using the tools provided by the Microsoft.Owin.Hosting nuget package.

Hello World Sample

Hello World Sample

OWIN is an HTTP server API abstraction at enables application portability across various servers. This sample demonstrates how to write a Hello World application using some simple wrappers around the raw OWIN abstraction and run it on a web server like Asp.Net.

Hello World Raw OWIN Sample

Hello World Raw OWIN Sample

OWIN is an HTTP server API abstraction at enables application portability across various servers. This sample demonstrates how to write a Hello World application using the raw OWIN abstraction and run it on a web server like ASP.NET.

SignalR Sample

SignalR Sample

An OWIN pipeline can be composed of many different components and frameworks. This sample shows how to include and run a SignalR hub in an OWIN pipeline.

Static Files Sample

Static Files Sample

In a modern web application, one of the core scenarios is hosting static resources. The Katana components provides a static resource server as middleware to address this need. This sample demonstrates various options for configuring and running the static file middleware.

WebAPI Sample

WebAPI Sample

OWIN is a HTTP server API abstraction at enables application portability across various servers. This sample demonstrates how to use the WebApi framework on OWIN based servers.

Web Sockets Sample

Web Sockets Sample

Web Socket provides an optimized approach for real-time, duplex messaging over HTTP. This sample shows how to configure and run a Web Sockets server using OWIN middlware as well as a Web Sockets client. The sample requires a minimum host configuration of Windows 8 and .NET 4.5.