NeonN
Neon2y ago
13 replies
then-purple

Barebones .NET Project Can't Connect - Console Request Failed

Hey folks. I've got an extremely simple console app and a free-tier database.

using Npgsql;

var builder = new NpgsqlConnectionStringBuilder();
builder.Host = "";
builder.Database = "";
builder.Username = "";
builder.Password = "";

var cn = new NpgsqlConnection(builder.ConnectionString);
cn.Open();


Ngpsql is the leading .NET Postgres database provider. With this setup I am routinely getting an error message Console Request Failed (attached).

I'm...not sure how much help I can get here because I can connect to the database from my IDE itself. But this driver is the de-facto option in .NET, so it feels like something weird is happening here.

Any advice? Thank you.
image.png
Was this page helpful?