c# - Cannot access a disposed object Object name: 'UserManager`1' -


I know that this question is asking for quite some time on the stack overflow but I tried to reply but non-problem In order to solve, I recently added unity to my project, except for doing everything fine except the User Manager class. If I try to access it in session then it can not reach the error stated in my title.

  Code which is throwing issues and containers under the Public Account Administrator (User Manager and LT; ApplicationUser & gt; User Manager) {UserManager = userManager; // Start new code UserManager.UserValidator = New UserValidator & lt; ApplicationUser & gt; (UserManager) {Allow AlAphanumericUserNames = false;}; } Container. Registration Type & lt; AdminController & gt; (); Container.RegisterType & LT; AccountController & gt; (); Container. Registration Type & lt; IBlogPostRepository, BlogPostRepository & gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; IBlogViewRepository, Blog View Repository & gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; ITagRepository, TagRepository & gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; ICategoryRepository, Category Repository & gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; IBlogCategoryRepository, BlogCategoryRepository & gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; IBlogTagRepository, BlogTagRepository & gt; (New hierarchical logogram manager ()); Container. Registration Type & lt; IApplicationUserRepository, ApplicationUserRepository & gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; UserManager & lt; ApplicationUser & gt; & Gt; (New hierarchical Lifetime Manager ()); Container. Registration Type & lt; IUserStore & lt; ApplicationUser & gt;, Userstore & lt; ApplicationUser & gt; & Gt; (New injection constructor (new catchmedia content)); Container. Registration Type & lt; DB Context, Catch Media Consent & gt; (New hierarchical Lifetime Manager ());  

If there are references to user managers in another object and that object has been dealt with, It may be possible to settle the user manager with another possibility that the user manager has some kind of initial requirement that has not yet been made, and its properties throw a deceptive removal exception (this is normal with Winform controls is).


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -