|
查看: 1099|回复: 1
|
PHP -> SQL Server 2005 Windows Authentication 问题
[复制链接]
|
|
|
请问各位,如果我的 IIS 和 SQL 分别在不同的 Server。
我要怎样用 Windows Authentication 来连接 SQL?
IIS 是 IIS 6.0 + PHP 5.2.9 + Windows Server 2003 R2。
SQL 是 SQL Server 2005 Standard + Windows Server 2003 R2。
翻了翻 MSDN 的 How to: Connect Using Windows Authentication http://msdn.microsoft.com/en-us/library/cc296205%28SQL.90%29.aspx
里面提到:
The following points must be considered when you use Windows Authentication to connect to SQL Server:
The credentials under which the Web server's process (or thread) is running must map to a valid SQL Server login in order to establish a connection.
If SQL Server and the Web server are on different computers, SQL Server must be configured to enable remote connections.
remote connection 我已经 enable 了,但是却连接不成功,显示:
[Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
猜想是因为我把 IIS 和 MSSQL 分开放的缘故。。
如果我把 IIS 和 MSSQL 都放在同一台 Server,就没有这个问题,可以连接。。
请问有人遇过同样的问题吗?应该要怎样解决? |
|
|
|
|
|
|
|
|
|
|
发表于 9-7-2010 04:28 PM
|
显示全部楼层
没有用过 Windows Authentication 来 connect database 过。
不过,做莫要酱麻烦,不可以用 SQL Authentication 来 connect 吗? |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|