OWIN host for OpenRasta, allows OpenRasta to be combined with other MiddleWare opening the possibilities.
- Remove OpenRasta AspNet Hosting (or not you can matain both)
- Add OpenRasta.Owin
- Create Startup.cs
- Add the following code
public void Configuration(IAppBuilder appBuilder)
{
IConfigurationSource configSources = new OpenRastaConfig();
appBuilder.UseOpenRasta(configSources);
}
Now you can start creating your hosting platform using the Microsoft.Owin hosting nugets (console, service, IIS). See code link below for an example https://github.com/justeat/openrasta-hosting-owin/blob/master/src/OpenRasta.Owin.Console/Program.cs
Using a custom dependency resolver
public void Configuration(IAppBuilder appBuilder)
{
IConfigurationSource configSources = new OpenRastaConfig();
IDependencyResolverAccessor customDependencyResolver = new CustomDependencyResolver()
appBuilder.UseOpenRasta(configSources, customDependencyResolver);
}