• 全部
  • 问答

Server Error in '/webapp' Application是什么原因?

hanzyoung 2002-03-14 03:43:12
Server Error in '/webapp' Application.
--------------------------------------------------------------------------------

用户 'MECHINE\ASPNET' 登录失败。
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.OleDb.OleDbException: 用户 'MECHINE\ASPNET' 登录失败。

Source Error:


Line 29: {
Line 30: // Put user code to initialize the page here
Line 31: oleDbDataAdapter1.Fill(dsCategories1);
Line 32: DataGrid1.DataBind();
Line 33: }


Source File: c:\inetpub\wwwroot\webapp\webform1.aspx.cs Line: 31

Stack Trace:


[OleDbException (0x80040e4d): 用户 'MECHINE\ASPNET' 登录失败。]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +131
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +98
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) +38
webapp.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapp\webform1.aspx.cs:31
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
...全文
21 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
hanzyoung 2002-03-14
不是用户口令的问题,是数据源的问题,我装了sql server 2000 desktop engine 后用SqlConnection myConnection = new SqlConnection("server=(local)\\NetSDK;database=pubs;Trusted_Connection=yes");
但用sql server 2000就不行:
SqlConnection myConnection = new SqlConnection("server=localhost;database=pubs;Trusted_Connection=yes");
为什么server=(local)\\NetSDK就行,但server=localhost就不行;
用visual stdio.net写代码时用localhost做数据源是可以连接的,但一运行就出错System.Data.OleDb.OleDbException: 用户 'MECHINE\ASPNET' 登录失败 ,为什么,帮帮我!
回复
zhq2000 2002-03-14
修改你的数据库连接串,将数据库用户及口令加进去。
回复
发帖
.NET技术其他语言
创建于2007-09-28

1815

社区成员

.NET技术 其他语言讨论
申请成为版主
帖子事件
创建了帖子
2002-03-14 03:43
社区公告
暂无公告