I'm trying to connect to a Heroku Postgres database (Hobby-dev level) from a C# Windows Forms application using the Npgsql provider and Entity Framework (latest versions), and I'm getting a ProviderIncompatibleException with the following inner exceptions:
"The provider did not return a ProviderManifestToken string." "FATAL: 42501: permission denied for database \"postgres\"" Detail: "User does not have CONNECT privilege."
The database is accessed by a Ruby on Rails app also running on Heroku, and I'm able to access it through pgAdmin III on Windows. I think it's not an issue with Npgsql since the connection is working perfectly with both local and remote PostgreSQL development databases.
The connection string I'm using in the app.config file looks like this:
Server=HerokuAmazonAWS;Port=5432;Database=MyHerokuDatabase;User Id=MyHerokuUsername;Password=MyHerokuPassword;SSL=true;SslMode=Require;
Since Heroku requires an SSL connection to the DB, I've set it in the connection string, so this doesn't appear to be an issue. This "permission denied for database postgres" error bothers me, because I'm not trying to connect to the postgres db on that server. Do you have any ideas what could be causing this and how to fix it? Thanks.