[Mono-list] Npgsql sample does not run, if manually compiled
Francisco Figueiredo Jr.
francisco at npgsql.org
Sun Oct 31 09:32:38 EDT 2010
Where is located your server postgresql and client problem?
If they are in different machines, so the problem is just like Abe
said. By default, postgresql allows only connections from localhost.
You can change that by changing your pg_hba.conf and postgresql.conf
files to allow other hosts to connect.
Checkout pg_hba.conf file, which is located in your Postgresql Data
folder. This file has some instructions inside it which will get you
In your postgresql.conf file, you will need to find a line which
reads: interfaces = localhost and change it to "*". This file also has
explanations about it.
I hope it helps.
On Sat, Oct 30, 2010 at 12:44, Abe Gillespie <abe.gillespie at gmail.com> wrote:
> If you're running SharpDevelop, which is Windows only, does that mean you're running your test program from two different machines? If so then you need to configure your DB's pg_hba.conf file.
> Sent from phone. Please excuse brevity and mistakes.
> On Oct 30, 2010, at 9:00 AM, "manfred.braun" <manfbraun at manfbraun.de> wrote:
>> Hi All !
>> I am just experimental working on the sample shown
>> [http://www.mono-project.com/PostgreSQL] for postgres. The program compiles
>> fine, this way:
>> # gmcs -debug+ -t:exe NpgSqlTest.cs -r:System.Data -r:Npgsql
>> but crashes with this message:
>> # mono --debug NpgSqlTest.exe
>> Unhandled Exception: Npgsql.NpgsqlException:
>> Connection refused
>> at Npgsql.NpgsqlClosedState.Open (Npgsql.NpgsqlConnector context)
>> at Npgsql.NpgsqlConnector.Open () [0x00000]
>> at Npgsql.NpgsqlConnectorPool.GetPooledConnector (Npgsql.NpgsqlConnection
>> Connection) [0x00000]
>> The completely unexpected thing is:If I make a project with SharpDevelop the
>> program [without source changes!] compiles AND runs !!!!!!!!!!!!!!!!! It is
>> NOT a "connection refused" issue [at the same time, I am connected].
>> Anyone any ideas, what happening here?
>> I am just in a early beginner situation, where I expect all [simple] proggis
>> to compile and run from the commandline. This looks like missing a compiler
>> switch [I think, I tried them all], a defined environment or something like
>> I am using:
>> debian lenny, 2.6.26-2-686
>> mono 1.9.1, containing corelib 2.0
>> Any help would be really great!
>> Mono-list maillist - Mono-list at lists.ximian.com
> Mono-list maillist - Mono-list at lists.ximian.com
Francisco Figueiredo Jr.
Npgsql Lead Developer
More information about the Mono-list