SQL Server does not exist or access denied. 
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: SQL Server does not exist or access denied.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
[SqlException: SQL Server does not exist or access denied.]
   System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
   System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
   System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
   logDB.sysmanageDB.sysmanaDB.FillDepartment() +134
   logUI.login.Add_department() +52
   logUI.login.Page_Load(Object sender, EventArgs e) +25
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731 

解决方案 »

  1.   

    你的SQLSerVer数据库服务是不是开起来了?或者你的数据库连接字符串写得正确吗,检查一下吧。
      

  2.   

    SQLSerVer数据库服务开了!数据库连接字符串也正确!
      

  3.   

    是不是查询语句执行时间太长了,造成查询超市,优化一下SQL语句~!
      

  4.   

    SQL Server 不存在或访问被拒绝。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: SQL Server 不存在或访问被拒绝。源错误: 
    行 41:  ada.SelectCommand.CommandType = CommandType.StoredProcedure;
    行 42:  DataSet ds_department = new DataSet();
    行 43:  ada.Fill(ds_department,"dep");
    行 44:  return ds_department;
    行 45: 
     这是在调试时出现的!
      

  5.   

    就是 服务器重启后 sqlserver服务启动了没你用sqlserver企业管理器能连上不
    ---------------------------
    苦海无边 回头无岸
    ---------------------------