Hosting environment: Production Content root path: F:\WebApps\SkillDorm-V1\API-SD\Course Now listening on: http://127.0.0.1:17095 Application started. Press Ctrl+C to shut down. Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances. Object name: 'AppDbContext'. at Microsoft.EntityFrameworkCore.DbContext.CheckDisposed() at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies() at Microsoft.EntityFrameworkCore.DbContext.Set[TEntity]() at RepositoryBase.Repository`1.get_DbSet() in C:\Program Files (x86)\Jenkins\workspace\SkillDorm-BE-V1\Repository\Repository\Repository.cs:line 34 at RepositoryBase.Repository`1.Find(Object[] keys) in C:\Program Files (x86)\Jenkins\workspace\SkillDorm-BE-V1\Repository\Repository\Repository.cs:line 70 at CourseService.Core.Service.CourseService.GetCourseBuilder(Int64 CourseId, List`1 Roles) in C:\Program Files (x86)\Jenkins\workspace\SkillDorm-BE-V1\CourseService.Core\Service\CourseService.cs:line 1733 at CourseService.Core.Service.CourseService.CalculateCoursePercentage(Int64 CourseId, Int64 CurrentModule, Int64 CurrentSection, Int64 UserId, List`1 Roles) in C:\Program Files (x86)\Jenkins\workspace\SkillDorm-BE-V1\CourseService.Core\Service\CourseService.cs:line 2470 at CourseService.Core.Service.CourseService.<>c__DisplayClass89_1.<b__2>d.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\SkillDorm-BE-V1\CourseService.Core\Service\CourseService.cs:line 2446 --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.<>c.b__139_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi) at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch()