Update: It seems to be problem with ElephantSQL, the service I'm using according to this
However, I dont know where to add this.
Exact error:
FATAL: 28000: no pg_hba.conf entry for host "host", user "username", database "template1", SSL off
Similar error to this problem. Even after adding SslMode=require
, I still couldn't connect to the database.
<add name="DefaultConnection" connectionString="Server=serverip;Port=5432;Database=dbname;User Id=username;Password=pass;CommandTimeout=60;Preload Reader=True;"/>
Weird thing is that it tried to connect to template1
instead of database specified in the connection string.
Connecting through pgadmin is fine though.