Server Error in '/' Application.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)

Source Error:


Line 17: 
Line 18: 
Line 19:         SqlDataReader zxzp_dtr = Maticsoft.DBUtility.SqlHelper.ExecuteReader(BASE.con, CommandType.Text, "select *  from (select top 15 company_id,company_name,company_highlight , (select top 1 hire_id FROM hire WHERE company_id =company.company_id and  hire_status=1 and hire_enddate>='" + DateTime.Now.ToShortDateString() + "' order by hire_insidesort desc,hire_announcedate desc,hire_id desc ) as  hire_id,(select top 1 hire_place FROM hire WHERE company_id =company.company_id and  hire_status=1 and hire_enddate>='" + DateTime.Now.ToShortDateString() + "' order by hire_insidesort desc,hire_announcedate desc,hire_id desc ) as  hire_place from company where company_audit=1 and (company_membertype = 1 or company_membertype = 2) order by company_announcedate desc,company_id desc)as t1 union all select *  from (select top 93 company_id,company_name,company_highlight , (select top 1 hire_id FROM hire WHERE company_id =company.company_id and  hire_status=1 and hire_enddate>='" + DateTime.Now.ToShortDateString() + "'  order by hire_insidesort desc,hire_announcedate desc,hire_id desc ) as  hire_id,(select top 1 hire_place FROM hire WHERE  company_id =company.company_id and  hire_status=1 and hire_enddate>='" + DateTime.Now.ToShortDateString() + "'  order by hire_insidesort desc,hire_announcedate desc,hire_id desc ) as  hire_place from company,cmember where  (company_id not in (select top 15 company_id from company where company_audit=1 and (company_membertype = 1 or company_membertype = 2) order by company_announcedate desc,company_id desc)) and company_clogin=cmember_login and  company_audit=1 and (company_membertype = 1 or company_membertype = 2) order by cmember_logindate desc,company_announcedate desc,company_id desc ) as t2  ");
Line 20:             int ss = 0;
Line 21:             while (zxzp_dtr.Read())

Source File: f:\foodjob.cn\gongzuo\index.aspx.cs    Line: 19

Stack Trace:


[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)]
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +102
   System.Data.SqlClient.SqlConnection.Open() +125
   Maticsoft.DBUtility.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) +92
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.SqlClient.SqlConnection.Open() +125
   Maticsoft.DBUtility.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, String cmdText, SqlParameter[] cmdParms) +92
   Maticsoft.DBUtility.SqlHelper.ExecuteReader(String connectionString, CommandType cmdType, String cmdText, SqlParameter[] commandParameters) +149
   gongzuo_index.Page_Load(Object sender, EventArgs e) in f:\foodjob.cn\gongzuo\index.aspx.cs:19
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   Maticsoft.DBUtility.SqlHelper.ExecuteReader(String connectionString, CommandType cmdType, String cmdText, SqlParameter[] commandParameters) +227
   search_resumes.Page_Load(Object sender, EventArgs e) in f:\foodjob.cn\search\resumes.aspx.cs:155
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.507