Starting with Open Web Interface for .NET (OWIN)
OWIN is a standard interface between .NET servers and web applications. It provides a middleware for decoupling a web server from a web application. The biggest advantage of OWIN is that we are able to host the web application anywhere, and keep the server and application completely separated.
Note
For more information on OWIN, the best place to start is with the Katana Project. Katana is a collection of projects thatĀ support OWIN with various Microsoft components.
So what does OWIN have to do with our project?
If you notice the code above we see all references to OWIN namespaces, and we register in the assembly the OwinStartup
object to our Startup
class. We must have at least one Startup
class registered in the OwinStartup
attribute. The Startup
class has one function called Configuration
. All Startup
classes must include this function, and it must accept IAppBuilder
. Additional services, such as IHostingEnvironment
and ILoggerFactory
may also...