天高任鸟飞

ASPNET登陆失败

转载自:http://publishblog.blogchina.com/blog/tb.b?diaryID=336088
解决方案:
osql -S COMPUTERNAME\VSDOTNET -E
USE DATABASENAME
EXEC sp_grantlogin 'COMPUTERNAME\ASPNET'
EXEC sp_grantdbaccess 'COMPUTERNAME\ASPNET'
EXEC sp_addrolemember 'db_owner', 'COMPUTERNAME\ASPNET'
go
原因:
The basic problem is that your SQL Server/MSDE database does not recognize the account name of the process running the Web page. ASP.NET applications run within the context of an account named computer\ASPNET. When your code runs, it makes a request to the SQL Server/MSDE for a trusted connection as the user computer\ASPNET. SQL Server/MSDE probably doesn't know who that is, so it refuses the connection.

posted on 2006-09-05 17:46 Kingstar 阅读(639) 评论(2)  编辑 收藏 引用 所属分类: ASP.NET

评论

# re: ASPNET登陆失败 2006-10-20 11:59 gispeople

说的很对!  回复  更多评论   

# re: ASPNET登陆失败 2008-07-29 16:22 zjl

对我的帮助很大,多谢
  回复  更多评论   

只有注册用户登录后才能发表评论。