在 Linux Docker 容器中运行的 .Net Core 2.2 应用程序无法使用 SQL 身份验证向另一台计算机上的 SQL Server 进行身份验证。错误信息是:
Cannot authenticate using Kerberos. Ensure Kerberos has been initialized on the client with 'kinit' and a Service Principal Name has been registered for the SQL Server to allow Kerberos authentication.
我们已将连接字符串配置为使用 SQL 身份验证(用户名和密码)。我们已尝试设置trusted_connection=false,但连接仍会尝试使用Kerberos 身份验证。
(编辑的)连接字符串是:
"server=ourfullyqualifiedserver.domain,1433;database=our-database;user=sql-user;password=sql-password;"
我希望能够使用 SQL 身份验证从容器连接到 SQL Server,但它仍在尝试使用 Kerberos。为什么以及如何使连接使用 SQL Server 身份验证?
最佳答案
您可能需要将 "Trusted_Connection=false;"
添加到您的连接字符串中。
此外,将服务器 IP 与您公开给服务器的端口一起使用。
关于sql-server - .Net Core Linux 容器不会使用 SQL 身份验证连接到 SQL Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57182954/