Server Error in '/' Application.

The connection was not closed. The connection's current state is connecting.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The connection was not closed. The connection's current state is connecting.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: The connection was not closed. The connection's current state is connecting.]
   System.Data.ProviderBase.DbConnectionClosedConnecting.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +100
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +198
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +422
   System.Data.SqlClient.SqlConnection.Open() +199
   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +40

[EntityException: The underlying provider failed on Open.]
   System.Data.Objects.ELinq.QueryParameterExpression.EvaluateParameter(Object[] arguments) +434
   System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +1586
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +215
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +40
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +220
   Federacao.Banco.Classe.Utilitarios.CarregaConfiguracao() +602
   Federacao.Banco.Classe.GlobalFederacao.OnInit(EventArgs e) +119
   System.Web.UI.Control.InitRecursive(Control namingContainer) +454
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1719


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4110.0