THIS IS BROKEN AND UNSUPPORTED, DO NOT USE THIS
My packageExample of owin middleware that "fixes" Unity's PerRequestLifetimeManager failure to dispose objects.
When using Unity as your dependency injection container in an Owin site you cannot use the UnityPerRequestHttpModule, which is responsible for diposing of objects registered with PerRequestLifetimeManager. Simply removing it causes these resources to leak, until cleaned up by the garbage collector.
This middleware manages the cleanup tasks previously done by UnityPerRequestHttpModule.
The line "DynamicModuleUtility.RegisterModule(typeof(UnityPerRequestHttpModule));" is no longer required.
Interface breaking change to extension method name to be more consistant.
Also, Changed key for registering middleware.