我已经在http://postgres-project-1241043.j.layershift.co.uk/主机中安装了 postgresql 数据库。
我想使用 C# 连接到数据库。我使用带有以下连接字符串的 Npgsql。
connectionString = @ "Server = postgres-project-1241043.j.layershift.co.uk, Port = 5432, User Id = postgre; Password = abcdef; Database = dbluanvantn;";
但我无法连接到服务器并收到错误:
Npgsql.NpgsqlException:无法连接到“postgres-project1241043.j.layershift.co.uk”。
我使用正确的连接字符串吗?帮我修一下。