OWIN – what i learned today

Open web interface for .NET is basically a connection between the web servers and the web application. So when you have a startup class with this code in your web  app

[Assembly: OwinStartup(typeOf(Startup1))]

public class Startup1

{

public void Configuration(IAppBuilder app)

{

app.run(()=> {

Context.response.contextType = "Text/plain";

})

}

}

 

So this is a middleware in the OWIN pipeline, when the webserver recieves a HTTP request the OWIN pipeline invokes the middleware. The middleware code will then run.