I have an Azure website in development that connects to a new Azure Postgresql database.
This error seemed to have started over the weekend. It was working fine the last time I tried it on Friday. The IP address of my Azure Site Plan seemed to change and I edited the Azure Postgres Firewall rules.
The really weird part is the "0.0.0.0" host. How is the web server looking like IP address "0.0.0.0" to the database? I did add "0.0.0.0" to the firewall as well but that did not have any effect. I of course cannot edit the pg_hba.conf file directly on Azure.
Also, it works fine when running from my dev computer. I tried redeploying my web site, no joy.
Here is the full stacktrace:
[PostgresException (0x80004005): 28000: no pg_hba.conf entry for host "0.0.0.0", user "UserName", database "orders", SSL on]
Npgsql.NpgsqlConnector.DoReadMessage(DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage) +310
Npgsql.NpgsqlConnector.ReadMessageWithPrepended(DataRowLoadingMode dataRowLoadingMode) +195
Npgsql.NpgsqlConnector.HandleAuthentication(String username, NpgsqlTimeout timeout) +57
Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout) +299
Npgsql.ConnectorPool.Allocate(NpgsqlConnection conn, NpgsqlTimeout timeout) +573
Npgsql.NpgsqlConnection.OpenInternal() +366
Npgsql.NpgsqlConnection.Open() +4
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +120
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +160
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +108
MapHazardsPro4.Functs.GetUserTable() in C:\inetpub\wwwroot\maphazardspro_q3_2017\Functs.vb:539
MapHazardsPro4.Global.Application_Start(Object sender, EventArgs e) in C:\inetpub\wwwroot\maphazardspro_q3_2017\Global.asax.vb:49
[HttpException (0x80004005): 28000: no pg_hba.conf entry for host "0.0.0.0", user "UserName", database "orders", SSL on]
System.Web.HttpApplicationFactory. EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10104513
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): 28000: no pg_hba.conf entry for host "0.0.0.0", user "UserName", database "orders", SSL on]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10085804
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254