-1

I have installed postgresql database in http://postgres-project-1241043.j.layershift.co.uk/ host.

I want to connect to the database using C#. I use Npgsql with following connection string.

connectionString = @ "Server = postgres-project-1241043.j.layershift.co.uk, Port = 5432, User Id = postgre; Password = abcdef; Database = dbluanvantn;";

But I am not able to connect to the server and get error:

Npgsql.NpgsqlException: Failed to a connection to 'postgres-project1241043.j.layershift.co.uk'.

Am I using correct connection string?. Help me fix it.

Damien - Layershift
  • 1,508
  • 8
  • 15
Phu Sang
  • 21
  • 1
  • 1
  • 3

1 Answers1

0

You can only connect to Postgres (on our Jelastic service) if you add a public IP to the node first. Without that step, you can only connect to it locally (i.e. from another server within your Jelastic environment).

Also I want to mention that you are always welcome to contact our support team (our tech. support is 24x7 and completely free; even for our trial accounts) if you need any further help.

Damien - Layershift
  • 1,508
  • 8
  • 15