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
...全文
105 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
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
  • 打赏
  • 举报
回复
修改你的数据库连接串,将数据库用户及口令加进去。

1,978

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧