1
我在我的應用程序中使用postgreSQL,但有時在固定的時間間隔後拋出NpgsqlException。NpgsqlException未能建立到服務器的連接
下面是異常的堆棧跟蹤:
Exception message: Failed to establish a connection to 'server'.
at EntitySpaces.Interfaces.esDataProvider.esLoadDataTable(esDataRequest request, esProviderSignature sig)
at EntitySpaces.Interfaces.esDynamicQuery.Load()
at BusinessObjects.Users.ValidatePassword(String UserName, String Password) in e:\Code\Entities\Custom\Users.cs:line 50
at PassiveSTS.Login.Login_Authenticate(Object sender, AuthenticateEventArgs e) in e:\Code\STS\Login.aspx.cs:line 32
at System.Web.UI.WebControls.Login.AttemptLogin()
at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Failed to establish a connection to 'server'.
at Npgsql.NpgsqlClosedState.Open(NpgsqlConnector context) in C:\Npgsql\NpgsqlClosedState.cs:line 171
,請幫助,如果任何人知道我做錯了。
在此先感謝。
主機與數據庫被命名爲 「服務器」? – wiero
我在我的代碼中使用主機名。 – Attri