Windows 2008/IIS cannot connect to Postgres 9.0

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Windows 2008/IIS cannot connect to Postgres 9.0
Date: 2010-10-05 08:08:26
Message-ID: AANLkTinbZ4Sx442BFq5LFYKyQCCtfOwzchFoVRN_S1Jr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey I know most of you guys are huge Windows fans, and UNIX support
will eventually be dropped in Postgres cuz really who uses that, but I
figure someone in here would love to help me with a Windows issue that
has me confused.

Postgres is working awesome on my Windows 2003 development
environment, using whatever flavor of IIS that thing comes with (is it
IIS6?).. However, I'm in the process of moving my site over to
production cloud servers and these appear to be rain clouds, as I'm
having all sorts of issues getting this running.. When I setup the
site with Windows 2008/IIS, the first page that queries Postgres gives
me the following crash:

3005
An unhandled exception has occurred.
10/5/2010 7:18:04 AM
10/5/2010 7:18:04 AM
fd49ed9391dd46fe9d2d11bd6392d9b6
6
1
0
/LM/W3SVC/1/ROOT-1-129307366626956000
Full
/
C:\inetpub\wwwroot\

2796
w3wp.exe
IIS APPPOOL\DefaultAppPool
InvalidOperationException
The Connection is not open.
http://127.0.0.1/logon.html
/logon.html
127.0.0.1

False

IIS APPPOOL\DefaultAppPool
7
IIS APPPOOL\DefaultAppPool
False
at Npgsql.NpgsqlCommand.CheckConnectionState() at
Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb) at
Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior cb) at
Npgsql.NpgsqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at
KPCServer.DB.Query.ExecSproc(String sproc, DbParameter[] parameters)
at KPCServer.KitchenPC.GetFeaturedRecipes(Int32 max) at
KPCServer.Pages.Logon.FeatuerdRecipes(TextWriter output,
DynamicContentArgs args) at Imp.Compiler.CompiledPage.Render(BasePage
page, TextWriter output) at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)

I couldn't find anything on the Googletubes about this, so after like
half an hour of cursing, I finally ran across a setting that fixes it.
If I switch the "Managed Pipeline" setting (WTF does this even mean?)
from "Integrated" to "Classic", everything works. My question is
what's the deal with this? Does "Integrated" somehow block the
process from opening a connection with Postgres? In the Postgres logs
I couldn't even see any evidence that anything was trying to connect
with it.. If anyone has an IIS7 website connecting to Postgres, maybe
you can share your app pool settings with me so I can understand the
best practice, as this will be a production environment now.. Thanks,
and sorry again for the quasi-off-topic email.. Go Postgres!

Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message AI Rumman 2010-10-05 08:21:40 Query tune, index is not using
Previous Message Magnus Hagander 2010-10-05 08:02:47 Re: queriing the version of libpq