InvalidOperation: The connection was not closed. The connections current state is connecting


Question: Why is this error showing up? the error says "InvalidOperation: The connection was not closed. The connections current state is connecting".

Login to See the Rest of the Answer

Answer:
This error is thrown by Entity Framework (EF Core), if you see in the Stack Trace log, you can notice that the Microsoft.Data.ProviderBase.DbConnectionClosedConnecting.TryOpenConnection() function threw this exception.

In order to resolve the issue, just stop debugging the application and restart again. I hope this helps you, if it does please leave a comment below indicating how you solved the error. 


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2023 - ErnesTech LLC- Privacy