1

Been trying to get my asp.net application to connect to my PostgreSQL database under mono for a few days to no avail. Can connect to it under IIS but not Apache and Mono.

The ASP.NET part works fine, it's just the connection to the database that wont play nice.

I get the following error:

Description: HTTP 500. Error processing request.

Stack Trace:

System.Exception: Failed to establish a connection to '127.0.0.1'.
  at Npgsql.NpgsqlClosedState.Open (Npgsql.NpgsqlConnector context) [0x00101] in /Users/fxjr/Desenvolvimento/ProjetosOpenSource/Npgsql/NpgsqlSourceRelease/Npgsql2/src/Npgsql/NpgsqlClosedState.cs:171 
Version information: Mono Runtime Version: 2.10.8 (tarball Fri Jul 20 23:48:09 UTC 2012); ASP.NET Version: 4.0.30319.1

Versions: Fedora 18, Mono 2.10.8, Apache 2.2.23, Npgsql 2.0.12

The production server that this will eventually run on is currently RHEL with Apache 2.2.x.

Thanks

wTheOnew
  • 11
  • 4
  • Please show the code you use to connect to your Postgres database. When you say it works from IIS, do you use the same postgres database on the same server ? – mbarthelemy Feb 17 '13 at 10:42
  • Added the code below. Different database using the same configuration and data. The database that I can't get this app to connect to does work though because I can connect to it from a Zope application without any issue. – wTheOnew Feb 18 '13 at 13:24

0 Answers0