Thread: Connecting to PostgreSQL server with Mono using ident authetication

Connecting to PostgreSQL server with Mono using ident authetication

From
Andreas Tille
Date:
Hi,

it is my first shot using Mono and I failed to get the example from

    http://www.mono-project.de/wiki/keyword/PostgreSQL/

working.  The reason is obviousely that whatever I tried NpgsqlConnection
tries to use password authentication but I have configured my system
that ident authentication is used by default.

I'm using Debian GNU/Linux testing running postgresql 8.2 and mono 1.2.
Could anybody enlight me how to connect to a database where users have
no password set because always ident authentication is used on local host.

I hope this is the right list for this kind of questions.  Any hint for
a better place to ask is welcome as well.

Kind regards

         Andreas.

PS: It would be welcome if you keep me in CC because I'm not subscribed
     to the list, but I can read the archive as well.

--
http://fam-tille.de

Re: Connecting to PostgreSQL server with Mono using ident authetication

From
"Albe Laurenz"
Date:
> it is my first shot using Mono and I failed to get the example from
>
>     http://www.mono-project.de/wiki/keyword/PostgreSQL/
>
> working.  The reason is obviousely that whatever I tried
> NpgsqlConnection
> tries to use password authentication but I have configured my system
> that ident authentication is used by default.
>
> I'm using Debian GNU/Linux testing running postgresql 8.2 and
> mono 1.2.
> Could anybody enlight me how to connect to a database where users have
> no password set because always ident authentication is used
> on local host.

The best list for this kind of thing is certainly the Npgsql
mailing list:
http://gborg.postgresql.org/mailman/listinfo/npgsql-general

What error messages do you get when you try to connect?

Yours,
Laurenz Albe

Re: Connecting to PostgreSQL server with Mono using ident authetication

From
Andreas Tille
Date:
On Mon, 4 Sep 2007, Albe Laurenz wrote:

> The best list for this kind of thing is certainly the Npgsql
> mailing list:
> http://gborg.postgresql.org/mailman/listinfo/npgsql-general

Just subscribed.

> What error messages do you get when you try to connect?

When I use the connection string

   string connStr = "Server=127.0.0.1;Port=5432;User=tillea;Database=InfluenzaWeb;";

I get

Npgsql.NpgsqlException:
Passwort-Authentifizierung für Benutzer 'tillea' fehlgeschlagen
   --> Translation: Password authentication for user 'tillea' failed
Severity: FATAL
Code: 28000
   at Npgsql.NpgsqlConnector.CheckErrors () [0x00000]
   at Npgsql.NpgsqlConnector.Open () [0x00000]
   at Npgsql.NpgsqlConnectorPool.GetPooledConnector (Npgsql.NpgsqlConnection Connection) [0x00000]


So npgsql is obviousely trying password authentication and I have no idea
how to ask for ident authetication.  I also tried
            Server=localhost

If I leave out the Server parameter at all I get

System.ArgumentException: Connection string argument missing!
Parameter name: SERVER

(which is different to other psql connectors I know from Python or Perl).

Kind regards

          Andreas.

PS:  I've seen a another private answer to my mail in my incoming box but due to
      a problem here it was deleted. :(
      Could the kind poster please repost his mail because I don't see it in
      the archive?

      Many thanks, Andreas.


--
http://fam-tille.de

Re: Connecting to PostgreSQL server with Mono using ident authetication

From
Andreas Tille
Date:
On Wed, 5 Sep 2007, Andreas Tille wrote:

> On Mon, 4 Sep 2007, Albe Laurenz wrote:
>
>> The best list for this kind of thing is certainly the Npgsql
>> mailing list:
>> http://gborg.postgresql.org/mailman/listinfo/npgsql-general
>
> Just subscribed.

Well, I looked at the archives of this list and also at

    http://gborg.postgresql.org/mailman/listinfo/npgsql-hackers

There is no posting at the later list for 2007 and only zero to
two postings per month on the general list.  This frequency is
very typical for dead projects.  Do you think I'm well advised
to use Npsql at all or is this an unreasonable conclusion?

Kind regards

       Andreas.

--
http://fam-tille.de

Re: Connecting to PostgreSQL server with Mono using ident authetication

From
Dave Page
Date:
Andreas Tille wrote:
> On Wed, 5 Sep 2007, Andreas Tille wrote:
>
>> On Mon, 4 Sep 2007, Albe Laurenz wrote:
>>
>>> The best list for this kind of thing is certainly the Npgsql
>>> mailing list:
>>> http://gborg.postgresql.org/mailman/listinfo/npgsql-general
>>
>> Just subscribed.
>
> Well, I looked at the archives of this list and also at
>
>    http://gborg.postgresql.org/mailman/listinfo/npgsql-hackers
>
> There is no posting at the later list for 2007 and only zero to
> two postings per month on the general list.  This frequency is
> very typical for dead projects.  Do you think I'm well advised
> to use Npsql at all or is this an unreasonable conclusion?

Npgsql is very much alive and kicking - you're just looking at the old
website. Try: http://pgfoundry.org/projects/npgsql/

Regards, Dave