“/”應用程序中的服務器錯誤。

在與 SQL Server 建立連接時出現與網絡相關的或特定於實例的錯誤。未找到或無法訪問服務器。請驗證實例名稱是否正確並且 SQL Server 已配置為允許遠程連接。 (provider: Named Pipes Provider, error: 40 - 無法打開到 SQL Server 的連接)

說明: 執行當前 Web 請求期間,出現未經處理的異常。請檢查堆棧跟蹤信息,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細信息。

異常詳細信息: System.Data.SqlClient.SqlException: 在與 SQL Server 建立連接時出現與網絡相關的或特定於實例的錯誤。未找到或無法訪問服務器。請驗證實例名稱是否正確並且 SQL Server 已配置為允許遠程連接。 (provider: Named Pipes Provider, error: 40 - 無法打開到 SQL Server 的連接)

源錯誤:

執行當前 Web 請求期間生成了未經處理的異常。可以使用下麵的異常堆棧跟蹤信息確定有關異常原因和發生位置的信息。

堆棧跟蹤:

[SqlException (0x80131904): 在與 SQL Server 建立連接時出現與網絡相關的或特定於實例的錯誤。未找到或無法訪問服務器。請驗證實例名稱是否正確並且 SQL Server 已配置為允許遠程連接。 (provider: Named Pipes Provider, error: 40 - 無法打開到 SQL Server 的連接)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +308
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) +456
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +275
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +1115
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +309
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +350
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +848
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +49
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +984
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +91
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +2167
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +270
   System.Data.SqlClient.SqlConnection.Open() +299
   Ky.SQLServerDAL.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) in D:\E\wwwroot\XDCMSv2010\Ky.SQLServerDAL\SqlHelper.cs:208
   Ky.SQLServerDAL.SqlHelper.ExecuteTable(String connectionString, CommandType cmdType, String cmdText, SqlParameter[] commandParameters) in D:\E\wwwroot\XDCMSv2010\Ky.SQLServerDAL\SqlHelper.cs:184
   Ky.SQLServerDAL.CommonModel.InfoModel.GetModel(Int32 modelId) in D:\E\wwwroot\XDCMSv2010\Ky.SQLServerDAL\CommonModel\InfoModel.cs:112
   Ky.BLL.CommonModel.B_InfoModel.GetModel(Int32 modelId) in D:\E\wwwroot\XDCMSv2010\Ky.BLL\CommonModel\B_InfoModel.cs:64
   Info.Page_Load(Object sender, EventArgs e) +447
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +116
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2750


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.1016