I encountered this error: “Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection”
The message itself indicates that the cause may be hard to track down. Thankfully, I came across the article below to troubleshoot.
I have a public async void method. It uses a dependency injection object and it calls one of the async methods of this DI object.
I changed the method from
public async void Method()
public async Task Method()