Relationship between Webapi, Webhost and Owin
I’m just trying to get my head around relationship between webapi, webhost (iis) and owin. I’ll write down my current understanding, and I ask you to tell me if it is correct or not.
I’m just trying to get my head around relationship between webapi, webhost (iis) and owin. I’ll write down my current understanding, and I ask you to tell me if it is correct or not.
I try to do the following in my web.config:
I am new to OWIN and Katana. I really don’t get why I should use OWIN, while I can use IIS. To simplify, my question is: What do I lose if I skip learning OWIN and use IIS for my websites?
Startup.cs is a new way to initialize your app instead of Application_Start in Global.asax and it’s fine. But is there a place to put my teardown logic, for example this:
I’ve set up a web site using an Owin self hosted console app. I’m serving static files with no problem, the ‘root’ of the static part of the site works properly, and the web API routes work fine also.
There are many samples online using OWIN/Katana to find users in a database based on ausername/password combination and generate a claims principal, such as…
I need to build an Owin middle-ware object but not from within the Startup class. I need to build it from within anywhere else in my code, so I need a reference to the AppBuilder instance of the application. Is there a way to get that from anywhere else?
I have arguments passed in via the command-line
I need a way to store a logging object per request. With HttpContext I would add this to the items Dictionary. I don’t want to bring HttpContext into this if I can help it.
The below code is what I propose for a Unity LifeTimeManager that will store objects in OwinContext’s Environment property, which I have access to with my Owin middleware.
I am re-implementing a request logger as Owin Middleware which logs the request url and body of all incoming requests. I am able to read the body, but if I do the body parameter in my controller is null.