Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert WorkOrder called BulkInsert WorkOrder called Insert Requisition called Insert WorkOrder called BulkInsert WorkOrder called ============================================================================= Provide Fault: The underlying provider failed on Open. StackTrace :System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Unable to access availability database 'eTurnsMaster' because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) --- End of inner exception stack trace --- at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectContext.ExecuteStoreQueryInternal[TElement](String commandText, String entitySetName, MergeOption mergeOption, Object[] parameters) at eTurnsMaster.DAL.EnterPriseUserMasterDAL.GetRecordForService(Int64 id) at eTurnsServices.Service1.GetPollAllFlag(Int64 RoomID, Int64 CompanyID, Int64 UserID) at SyncInvokeGetPollAllFlag(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Date :12/27/2019 3:06:34 AM ============================================================================= ============================================================================= Provide Fault: Unable to access availability database 'eTurnsMaster' because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later. StackTrace :System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Unable to access availability database 'eTurnsMaster' because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later. at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) --- End of inner exception stack trace --- at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) at System.Data.EntityClient.EntityConnection.Open() at System.Data.Objects.ObjectContext.EnsureConnection() at System.Data.Objects.ObjectContext.ExecuteStoreQueryInternal[TElement](String commandText, String entitySetName, MergeOption mergeOption, Object[] parameters) at eTurnsMaster.DAL.EnterPriseUserMasterDAL.GetRecordForService(Int64 id) at eTurnsServices.Service1.GetPollAllFlag(Int64 RoomID, Int64 CompanyID, Int64 UserID) at SyncInvokeGetPollAllFlag(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Date :12/27/2019 3:06:34 AM =============================================================================