658

Downloads

547

Downloads of v 1.1.0

<1

Average downloads per day

2015-06-24

Last published

Share on Social Networks

Unity Owin RequestLifetimeMiddleware

1.1.0

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.

To install Unity Owin RequestLifetimeMiddleware, run the following command in the Package Manager Console

Install-Package RequestLifetimeMiddleware

Release Notes

Interface breaking change to extension method name to be more consistant.
Also, Changed key for registering middleware.

Owners

Authors

nathan cooper

Dependencies

Version History

Version Downloads Last updated
Unity Owin Reques... 1.0.0 111 Tuesday, June 16, 2015