How can I connect from entityframework on c#?

Hello,
I’m trying to connect from entity framework on c#. I 'm getting following error. I checked my password and user name is true. I didn’t find any form for my ip address to adding safe ip address. How can I connect mydb from local computer?

CXX000: password authentication failed for user ‘myusername’

Best
Onder

Hi,
I am not a user of entity framework on c#, but taking a look at how it’s done in this example, perhaps these details will help:

When you create a Neon project, you are provided with a connection string. For example:

postgres://daniel:XXXXXXXXXXXX@ep-white-morning-123456.us-east-2.aws.neon.tech/neondb

This corresponds to:

User id is daniel
Password is XXXXXXXXXXXX
Host is ep-white-morning-123456.us-east-2.aws.neon.tech
Port number is 5432 (Neon uses default 5432 port)
Database name is neondb (neondb is the default database created with each Neon project)

Use these details to create your connection string. The values above give this connection string:

“Server=ep-white-morning-123456.us-east-2.aws.neon.tech;Database=neondb;User Id=daniel;Password=XXXXXXXXXXXX;Port=5432”

For general information about connecting to Neon, please see Connect from any application.

1 Like

Hello Daniel,

My host was wrong. It’s working now,

thanks a lot.