Summary:
This article troubleshoots an error that occurs when attempting to assign data access after the default port has been changed.
Symptoms:
When a user tries to assign data access in Access Management in the Administration Tool, the user gets the following error message:
System.Exception: Add Company Access is not available. --- System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) --- System.ComponentModel.Win32Exception: Access is denied
--- End of inner exception stack trace ---
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)
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.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at OneStop.Toolkit.Data.SqlWrapper.FillDataSet(IDbDataAdapter da, DataSet& ds)
at OneStop.Toolkit.Data.DatabaseConnection.GetDataSetCore(IDbCommand cmd)
at OneStop.Toolkit.Data.DatabaseConnection.GetDataSet(IDbCommand cmd, IEnumerable`1 parameters)
at OneStop.Toolkit.Data.DatabaseConnection.GetDataTable(IDbCommand cmd, String alias, IEnumerable`1 parameters)
at OneStop.Framework.Repository.SqlSimpleQuery.GetData(IChannelFactory cf)
at OneStop.Framework.Repository.SimpleQuery.GetLookup(IChannelFactory cf)
at OneStop.Facade.Configuration.GetDataSources(String reportId)
at OneStop.Controls.Configuration.SimpleConfigurationControl.GetCompanies()
at
Causes:
By default, the application uses port 1433 to access the SQL server. The user who is trying to assign data access cannot connect to the SQL server due to change of the default port.
Resolution:
If a specific port is going to be used to access the SQL server, the application can be pointed to the alternative port via the BI360 Administration Tool by following the below steps:
- Go to the Admin Tool System Settings Repository Connection
- In the Repository Connection, there will be a text box called "Server"
- In the text box immediately following the server name, type in a comma followed by a space and then the server port to be used
i.e. If the server name is MyServer and the port to be used is port 1234 the text box should read "MyServer, 1234"
Once the new port number has been added in the Server text book, the user should be able to connect to the SQL server and assign data access in Access Management.
Properties:
BI360 Administration Tool 4.x