Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OWIN boils down to two things:</p> <p>1) an "environment" dictionary</p> <p>2) a method that processes requests and sends responses.</p> <p>For #1, this is just a property bag that gives you access to the request headers, request stream, response headers, response stream and server data. Think of this as your HttpContext for ASP.NET or HttpListenerContext for System.Net.HttpListener. In fact, in more recent builds of Katana (<a href="https://katanaproject.codeplex.com/" rel="nofollow">https://katanaproject.codeplex.com/</a>, which is an open source implementation from the ASP.NET team, there have been improvements (more to come) to simplify this down to an easier to use object model, including an <a href="https://katanaproject.codeplex.com/SourceControl/latest#src/Microsoft.Owin/OwinRequest.cs" rel="nofollow">OwinRequest</a>, <a href="https://katanaproject.codeplex.com/SourceControl/latest#src/Microsoft.Owin/OwinResponse.cs" rel="nofollow">OwinResponse</a>, and <a href="https://katanaproject.codeplex.com/SourceControl/latest#src/Microsoft.Owin/IOwinContext.cs" rel="nofollow">IOwinContext</a>.</p> <p>For #2, this is often called the "AppFunc" and the signature is:</p> <pre><code>using AppFunc = Func&lt;IDictionary&lt;string, object&gt;, Task&gt;; </code></pre> <p>This signature is used for "Middleware" that is in a pipeline of request handlers or it can be the end application which is generating HTML, is a WebAPI, etc.</p> <p>In Katana, there is a class you can inherit from that simplifies this signature to consume the IOwinContext I mentioned previously. Take at look at <a href="https://katanaproject.codeplex.com/SourceControl/latest#src/Microsoft.Owin/OwinMiddleware.cs" rel="nofollow">OwinMiddlware</a></p> <p>You can also read this article which gives an overview of the Katana/OWIN effort: <a href="http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana" rel="nofollow">http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload