“/”应用程序中的服务器错误。

在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)

源错误:

行 79:         sbSql.Append(" where b.accountid=a.accountid and b.[Project_ID]=a.[projectid] and a.del=0 and a.ispass=1 and b.P_PublishTime>'" + dbe + "' and (a.type2='" + column + "') ");
行 80:         sbSql.Append(" order by dateandtime desc"); 
行 81:         DataSet ds = new BLL.t_User().GetListBySql(sbSql.ToString());
行 82:         DataTable dt = ds.Tables[0];
行 83:         if (dt.Rows.Count > 0)

源文件: d:\newweb_2013_09_06_By_194\cd_sub\index.aspx.cs    行: 81

堆栈跟踪:

[SqlException (0x80131904): 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)]
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +414
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
   System.Data.SqlClient.SqlConnection.Open() +96
   DBUtility.SqlHelper.PrepareCommand(DbCommand cmd, DbConnection conn, DbTransaction trans, CommandType cmdType, String cmdText, DbParameter[] cmdParms) in D:\cd\China-Designer-Asp.net_svn.root\China-Designer-Asp.net_svn_1\DBUtility\SqlHelper.cs:244
   DBUtility.SqlHelper.ExecuteQuery(String connectionString, CommandType cmdType, String cmdText, DbParameter[] cmdParms) in D:\cd\China-Designer-Asp.net_svn.root\China-Designer-Asp.net_svn_1\DBUtility\SqlHelper.cs:110
   DBUtility.DBHelper.ExecuteQuery(CommandType cmdType, String cmdText, DbParameter[] cmdParms) in D:\cd\China-Designer-Asp.net_svn.root\China-Designer-Asp.net_svn_1\DBUtility\DBHelper.cs:219
   SqlServerDAL.t_User.GetListBySql(String SQL) +60
   BLL.t_User.GetListBySql(String SQL) +53
   cd_sub_index.GetHotHomeProject(Int32 topN, String column, Int32 days) in d:\newweb_2013_09_06_By_194\cd_sub\index.aspx.cs:81
   cd_sub_index.Page_Load(Object sender, EventArgs e) in d:\newweb_2013_09_06_By_194\cd_sub\index.aspx.cs:31
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


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

奇幻城娱乐官网