Как подключиться к MS SQL Express c#?

Есть код

internal class Program
{
    private static string connection_path 
        = "Data Source=.\\SQLEXPRESS;Initial Catalog=master;Integrated Security=True;MultipleActiveResultSets=True";

    private static SqlConnection connect;
    async static Task Main(string[] args)
    {
        connect = new SqlConnection(connection_path);
        Console.WriteLine("Connection...");
        try
        {
            await connect.OpenAsync();
            Console.WriteLine("Connection is successfully");

        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }
        finally
        {
            if (connect.State == ConnectionState.Open)
                await connect.CloseAsync();
        }
     
    }
}

После запуска выдает ошибку A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - Цепочка сертификатов выпущена центром сертификации, не имеющим доверия.)


Ответы (0 шт):