Error: 用户登录失败(该用户没有可信任的SQL Server连接)

文章编号 : 35141
软件: ArcGIS Server 9.3, 9.3.1
操作系统: Windows 2000, XP, 2003Server, Vista, 2008Server
已邀请:

易智瑞技术支持

赞同来自:

错误信息: 在ArcGIS Manager中配置安全策略时,如果用SQL Server作为用户和角色的存储,配置完以后,在用户角色面板中可能会出现类似下面的错误:

"An error has occurred on the server. For details please check the Event (Application) log on the web server. Login failed for user \'\'. The user is not associated with a trusted SQL Server connection."
或者
"Cannot open database '<database name>' requested by the login. The login failed. Login failed for user '<domain>\<username>'."

满足以下条件时会出现这样的错误:
a)Manager运行在Windows XP或Windows Server 2000上
b)用户和角色存储选择的是SQL Server Express
c)SQL Server Express运行在另一台机器上,操作系统是Windows Vista, Windows Server 2003或者Windows Server 2008
d)在配置安全向导时勾选了“Use trusted connection”
原因: SQL Server的“Use trusted connection”选项使用windows账户连接数据库。Manager程序用本地的ASPNET用户和本地生成的密码建立连接。这个本地生成的密码可能和运行SQL Server机器上的密码不一致。由于连接SQL Server Express使用Windows验证,而ASPNET账户在数据库服务器上可能有不同的用户名及密码,因此SQL Server Express拒绝Manager访问。

解决方法:
目前对于这种配置没有解决办法。因为要使两台机器上的ASPNET账户密码相同,而这种方式是不建议采用的。 可以用另一种配置,包括:  在web server上安装SQL Server,在配置Manager的安全机制时指向这个数据库  用SQL用户连接SQL Server Express。这种方式需要修改SQL Server的安全设置,用SQL Server Management Studio Express,添加一个SQL用户,并允许该用户访问Manager安全机制添加的用户和角色数据库。 微软建议在可能的情况下尽量使用Windows验证的方式。


创建时间:2008-06-26
最近更新: 2010-06-17


原文链接
http://support.esrichina.com.cn/2008/0626/776.html

要回复问题请先登录注册