注册 登录
编程论坛 ASP.NET技术论坛

用户 'JUJUMAO\ASPNET' 登录失败怎么办?(有源码)

yeyuanzhi 发布于 2007-09-22 22:31, 1383 次点击

我用浏览器浏览时出现这样的错误:
Server Error in '/' Application.
--------------------------------------------------------------------------------

用户 'JUJUMAO\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.SqlClient.SqlException: 用户 'JUJUMAO\ASPNET' 登录失败。

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 (0x80131904): 用户 'JUJUMAO\ASPNET' 登录失败。]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
BookStore.BookStoreDBO.GetBookCategories() in c:\inetpub\wwwroot\bookstore\bookstoredbo.cs:244
BookStore.Menu.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\bookstore\menu.ascx.cs:34
System.Web.UI.Control.OnLoad(EventArgs e) +98
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Control.LoadRecursive() +154
System.Web.UI.BasePartialCachingControl.LoadRecursive() +113
System.Web.UI.Control.LoadRecursive() +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4308


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
怎么回事?哪位高手帮忙调试一下?

源码:
只有本站会员才能查看附件,请 登录

[此贴子已经被作者于2007-9-23 8:23:39编辑过]

9 回复
#2
卡卡艾2007-09-23 08:17

糟糕,我也碰上这个问题了.

[此贴子已经被作者于2007-9-27 10:31:18编辑过]

#3
yeyuanzhi2007-09-23 08:21
我现在已经上传源码给你们调试了
#4
yeyuanzhi2007-09-23 10:26

哪位高手帮我看看啊,急!!!

#5
jxnuwy042007-09-23 11:20
登陆失败最常见的问题应该就是数据库的连接字符串写错了,或是数据库中没有ASPNET这个用户...建议你从这写方面看看,我想逻辑代码出了问题是不会提示这种错误的吧.
#6
卡卡艾2007-09-27 10:32

看看..

[此贴子已经被作者于2007-9-29 22:24:57编辑过]

#7
yeyuanzhi2007-09-29 18:03

谁能调试看看啊?

#8
卡卡艾2007-09-29 22:32
没有问题啊..
我那你的项目下下来了./
没有问题啊.
可以运行的.
#9
卡卡艾2007-09-29 22:33

你是在哪一步出的这个问题?
登陆后?

[此贴子已经被作者于2007-9-29 22:42:28编辑过]

#10
卡卡艾2007-09-29 22:50

我刚看了下.
你这样解决试下:
你不应该用WINDOWS方式登陆SQL,在你的配置文件里你改下你的连接串.
用那种server=...database=....uid=....pwd=...
然后把你数据库里的登陆方式改为混合登陆模式.
不知道怎么改的话就直接改注册表吧:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\LoginMode 你看下它的值是不是1??如果是将它的值改为2.
然后你再运行你的项目看看.

1