精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
I try and run the project in VS.Net 2003 and I get Server Error in '/Shopping' Application.我试着在VS.Net2003运行项目,我在应用 '/Shopping' 遇到服务器错误。
SQL Server does not exist or access denied.SQL服务器不存在或访问被拒绝。
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描述:一个未处理的异常发生在执行当前的web请求。有关更多信息,请查看堆栈跟踪和触发的代码
Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied
异常详细信息:System.Data.SqlClient。SqlException异常:SQL服务器不存在或访问被拒绝
Source Error: 来源错误:
Line 70: }
Line 71:
Line 72: sqlDataAdapter1.Fill(dsProduct1);
Line 73: DataGridProduct.DataBind();
Line 74: if (!IsPostBack)
Source File: c:\inetpub\wwwroot\shopping\main.aspx.cs Line: 72 源文件:c:\ inetpub \ wwwroot \ \ main.aspx购物。cs线:72
Stack Trace: 堆叠追踪:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
Shopping.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\shopping\main.aspx.cs:72
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
figured it out..... change "guddu" to "localhost" everywhere you can find it - or the name where your SQL server resides搞懂了.....“guddu”改为“localhost”到处都可以找到它——或SQL server所在的名称
usually the line looks like this 通常是这样的:
this.sqlConnection1.ConnectionString = "workstation id=guddu;packet size=4096;user id=sa;data source=guddu;persist securi" +
"ty info=False;initial catalog=Northwind";
i figure it out too for all pages except for main.aspx.我也弄明白除main.aspx之外的所有页面。
error "login fail for sa' - appear. tried to delete it,but still have the error...pls advice“sa”——登录失败出现错误。试图删除它,但仍然有错误…请给一点建议
u just check for ur sql server status你只是检查你的sql服务器状态 whether the service agent is started or not是否启动服务代理
because such type of error occurs only when there is problem in establishing the connection with sql server
因为这种类型的错误只有与sql服务器建立连接时才会发生