IsNemoEqualTrue/monitor-table-change-with-sqltabledependency

Can not connect to SQL Server.Error:The login name is from an untrusted domain OR The execution timeout has expired

Closed this issue · 4 comments

I'm very confused and try many times. I use ‘sa’ username conneted to SQL Server in sqltabledependency
But,I always get Error as follow :

2021-03-14-23-31-18

translate is:

SqlException: Login failed. The login name is from an untrusted domain and cannot be used with Windows authentication.

if I give a string directly, don't contain "Integrated Security",timeout error will occur!

image

translate is:

The execution timeout has expired. The timeout elapsed before completing the operation or the server did not respond.

I change a lot of connstr and don't work.
IF only use ADO.NET connect SQL Server ,It goes fine. No any connect Error.

I test it in a local yet,The Error still occur!

SQL Server Version is "SQL Server 2012 (SP1)"
.NETFramework 4.5.1
SqlTableDependency 8.5.8 (latest)

I test lower version SqlTableDependency , this Error still occur!

What should I do to fix it?this project is very urgent!

Thank you very very very much for your help!!!

It is very strange. I do not think it depends on SqlTableDependency, as the code does not change the connection string at all.
Here is the connection string I sued on my test cases:

connectionString="Data Source=DESKTOP-DFTT9LE\SQLSERVER2008;initial catalog=TableDependencyDB;User ID=Test_User;Password=xxxxx"

As you can see, I simply specified User ID and Password, without any other parameters.

What happen in case you remove "schemaName:FUJIUSER" ?

remove "schemaName:FUJIUSER"

If remove "schemaName:FUJIUSER", The Error of "untrusted domain" still!

It is very strange. I do not think it depends on SqlTableDependency, as the code does not change the connection string at all.
Here is the connection string I sued on my test cases:

connectionString="Data Source=DESKTOP-DFTT9LE\SQLSERVER2008;initial catalog=TableDependencyDB;User ID=Test_User;Password=xxxxx"

As you can see, I simply specified User ID and Password, without any other parameters.

Sorry, for reply later. I try to connect the other SQL Server,the programe goes well! does not have these error

These Error may be caused by my virtual host Environment. Windows Server 2012 in my virtual host join into a domain.

I guess the domain environment cause the error of authentication. BUT, it does not have any Error that I use the same connection string directly in ADO.net code.

So It is very very strange!

This issue can be closed if no one else encountered this problem