Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should release DependencyResolver when stop NinjectMvcHttpApplicationPlugin #33

Open
scott-xu opened this issue Oct 23, 2013 · 1 comment

Comments

@scott-xu
Copy link
Member

https://github.com/ninject/ninject.web.mvc/blob/dafbcbfcbe2e15c0de6ed24781c1d6cbf21d6c9f/mvc3/src/Ninject.Web.Mvc/NinjectMvcHttpApplicationPlugin.cs#L63

Should set resolver to null in Stop function

DependencyResolver.SetResolver(null)
@scott-xu
Copy link
Member Author

Just realized that null is not valid for SetResolver function.
Set it back to the DefaultDependencyResolver is a tricky way:

DependencyResolver.SetResolver(new DependencyResolver().InnerCurrent);

http://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Mvc/DependencyResolver.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant