德州第十中学:SQL Server 不存在或访问被拒绝。

来源:百度文库 编辑:神马品牌网 时间:2024/05/08 14:53:01
各位大哥,为什么会这样的啊.我从网上下一个网上商城的程序,调试就这样了.我要怎做啊?

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

SQL Server 不存在或访问被拒绝。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.SqlClient.SqlException: SQL Server 不存在或访问被拒绝。

源错误:

行 236:
行 237: //打开数据库连接
行 238: myConnection.Open();
行 239: //执行数据操作命令
行 240: //SqlDataReader读取数据到记录集后,会自动关闭数据库的连接

源文件: c:\inetpub\wwwroot\shopping\istoredbo.cs 行: 238

堆栈跟踪:

[SqlException: SQL Server 不存在或访问被拒绝。]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
shopping.IStoreDBO.Getwaretype() in c:\inetpub\wwwroot\shopping\istoredbo.cs:238
shopping.Type.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\shopping\type.ascx.cs:33
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.2032; ASP.NET 版本:1.1.4322.2032

看看你的数据库连接字符串是不是丢失了。设个断点跟踪一下