Whats the correct setting in my app.config file to ensure connection to my managed postgresql database

I have just imported my database into my postgresql managed database

Specified connection string is as below. (I have put ?? temporarily for password)

username = doadmin password = ?? host = port = 25060 database = crystal sslmode = require

I am now trying to set above up in my app.config file . I have 3 options below.

OPTION 1 (Connection to local Db on my PC) Worked Fine <add name=“CRYSTALAPPZ” connectionString="Host =; Database = tournaments; Port = 5432; Username = postgres; Password = manager "/>

OPTION 2 (Connection to Managed Db on Digital Ocean) Did not Work <add name=“CRYSTALAPP” connectionString=“host =; database = crystal; port = 25060; username = doadmin; Password = wAFtPnmnwV6bFVRP” />

OPTION 3 (Connection to Managed Db on Digital Ocean) Did not Work <add name=“CRYSTALAPPX” connectionString=“Host =; Database = crystal; Port = 25060; Username = doadmin --set=sslmode=require --set=sslrootcert=c:\crystal\images\ca-certificate.crt” />

I have not been able to connect to my managed database . It reports a connection problem even though OPTION 1 works for local Database.

Option 2 specified the IP of my Droplet as host (Is this correct)

Option 3 specified host as in parameters above (Is this correct)

My preference is for OPTION 3 that uses the ca-certificate

How can I get my connection to the managed postgresql database working

Please note that i have used psql to query the managed database and that works


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @techsupport19fe,

Everything seems fine from looking at it. Having said that, make sure to allow your IP in the trusted hosts for the database. This might be the reason why you are not being able to connect.

Additionally, what tool are you using to connect to your Managed Database from your local computer?