After connecting SQL Server to your .NET Core application on Linux, you can get the following error when running your application:
Build started...
Build succeeded.
Microsoft.Data.SqlClient.SqlException (0x80131904): **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.**
In order to solve this, simply add the following parameter in the connection string used to connect your app to SQL Server: Integrated Security=false;
as follows:
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=MyDatabase;Trusted_Connection=True;Integrated Security=false;User Id=MyUserId;Password=MyPassword"
}