Microsoft.Owin NuGet package contains AppBuilderUseExtensions class that provides extension methods for chaining middlewares in OWIN pipeline.
The source code for this post can be found at https://github.com/DmitryZinchenko/blogRunUseAndChaining
Run or Use?
- Run – inserts into the OWIN pipeline a middleware which does not have a next middleware reference
- Use – inserts into the OWIN pipeline a middleware which has a next middleware reference
Continue reading “Run, Use and OWIN Middleware Chaining”
In this post we explore the types found in Microsoft.Owin namespace as well as the reasons why would you use them.
The source code for the post can be found at https://github.com/DmitryZinchenko/blogBenefitsMicrosoftOwin
What Is The Problem?
To understand the benefits of types in Microsoft.Owin namespace let’s take a look at the effort and shortcomings of writing OWIN middleware using only types defined in OWIN specification. The specification defines the environment dictionary “…that stores information about the request, the response, and any relevant server state”. That includes information like HTTP method, request and response header values, query string, request and response body, etc.
Continue reading “Benefits of Types in Microsoft.Owin Namespace”
In this post we explore the ways how we can write OWIN middleware.
The source code for the post can be found at https://github.com/DmitryZinchenko/blogWritingOwinMiddleware01 .
If you had a chance to read OWIN specification you must have noticed that it only explains what Open Web Interface for .NET is, names software actors involved but does not give much details regarding how to write middleware components. So, let’s take a look how we can do it.
Continue reading “How to Write OWIN Middleware”