не могу подключиться к серверу базы данных onsite

<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
 
  <add name="redis" connectionString="host=localhost;db=2;port=6379;timeout=20;maxReadPoolSize=10;maxWritePoolSize=500" />
  <add name="defPackagesWorkingCopyPath" connectionString="%TEMP%\%APPLICATION%\%APPPOOLIDENTITY%\%WORKSPACE%\TerrasoftPackages" />
  <add name="tempDirectoryPath" connectionString="%TEMP%\%APPLICATION%\%APPPOOLIDENTITY%\%WORKSPACE%\" />
  <add name="sourceControlAuthPath" connectionString="%TEMP%\%APPLICATION%\%APPPOOLIDENTITY%\%WORKSPACE%\Svn" />
  <add name="elasticsearchCredentials" connectionString="User=gs-es; Password=DEQpJMfKqUVTWg9wYVgi;" />
  <add name="influx" connectionString="url=http://10.0.7.161:30359; user=; password=; batchIntervalMs=5000" />
  <add name="messageBroker" connectionString="amqp://guest:guest@localhost/BPMonlineSolution" />
  <add name="db" connectionString="Data Source=MSKDTC01-SQL01\CRM; Initial Catalog=ELZTerrasoft; User ID=Terrasoft123; Password=Root123-4;MultipleActiveResultSets=True;Pooling=true;Max Pool Size=100" />
</connectionStrings>

выше мой файл настроек



у пользователя есть права владельца 



но при попытке открыть сайт выдает 

 

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.



Exception Details: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)



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:

 

[SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   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) +1431
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +1085
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +70
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +964
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +109
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1529
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +156
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +258
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +312
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +202
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +413
   System.Data.SqlClient.SqlConnection.Open() +128
   Terrasoft.Core.DB.DBExecutor.<get_DBConnection>b__14_0() +22
   Polly.<>c__DisplayClass109_0.<Execute>b__0(Context ctx, CancellationToken ct) +23
   Polly.<>c__DisplayClass103_0.<NoOp>b__1(Context ctx, CancellationToken ct) +18
   Polly.NoOp.NoOpEngine.Implementation(Func`3 action, Context context, CancellationToken cancellationToken) +17
   Polly.<>c.<NoOp>b__103_0(Action`2 action, Context context, CancellationToken cancellationToken) +105
   Polly.Policy.Execute(Action`2 action, Context context, CancellationToken cancellationToken) +70
   Polly.Policy.Execute(Action action) +119
   Terrasoft.Core.DB.DBExecutor.get_DBConnection() +238
   Terrasoft.Core.DB.DBExecutor.PingDB(UserConnection userConnection) +47
 
[SecurityException: System login error. Error has been recorded in system log of the server. Please contact your system administrator.]
   Terrasoft.Core.DB.DBExecutor.PingDB(UserConnection userConnection) +240
   Terrasoft.Core.SystemUserConnection.InitializeCurrentUser(String userName, TimeZoneInfo timeZone, String clientIP, String agent, Boolean needRegisterSessionStart) +28
   Terrasoft.Core.SingleInstanceSystemUserConnectionProvider.Initialize(Boolean doLogin) +127
   Terrasoft.Core.AppConnection.InitializeSystemUserConnection(ConfigurationSection schemaManagerProviderConfigurationSection) +51
   Terrasoft.Core.AppConnection.Initialize() +493
   Terrasoft.WebApp.Loader.Global.InitializeAppConnection() +152
   Terrasoft.WebApp.Loader.Global.Application_Start(Object sender, EventArgs e) +230

Нравится

1 комментарий

Дмитрий, добрый день! 

 

Данная ошибка связана с тем, что возникают проблемы подключения к серверу базы данных SQL с сервера IIS.



С рекомендациями по устранению данных проблемы можно ознакомиться тут 

https://stackoverflow.com/questions/16256533/a-network-related-or-instance-specific-error-occurred-while-establishing-a-conne

и

https://thycotic.force.com/support/s/article/System-Data-SqlClient-SqlException-0x80131904

Показать все комментарии