A year ago on this very setup it was working. I've been working on completely unrelated stuff and now I'm back to the old project--and I'm getting login failed for user 'servername'\GUEST.
一年前,就在这个装置上,它起作用了。我一直在做完全不相关的事情,现在我回到了以前的项目中——我的用户“servername”\GUEST登录失败了。
Note: GUEST, not my username.
注意:客人,不是我的用户名。
Workstation: Win 7/64 Ultimate.
工作站:7/64最终获胜。
Server: SQL Server, XP Pro
服务器:SQL Server, XP Pro
The workstation has a drive letter mapped to a directory on the server, auto-restored at boot.
工作站有一个驱动器字母映射到服务器上的一个目录,在引导时自动恢复。
The connection string is: server='servername'; Trusted_Connection=yes
连接字符串为:server='servername';Trusted_Connection = yes
It's not specifying a database as the objective of this code is to create the database.
它没有指定数据库,因为这段代码的目标是创建数据库。
I'm not aware of any system changes beyond all the updates Microsoft sends. Both boxes are fully patched.
除了微软发送的所有更新之外,我不知道有任何系统更改。这两个箱子都已完全修补过了。
Edit: Yes, they are the same domain. This used to work.
编辑:是的,它们是同一个域名。这用来工作。
Edit: I reproduced it with a trivial project:
编辑:我用一个小项目复制了它:
using System;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string ConnectionString = "Server=Hydrogen; Trusted_Connection=yes";
try
{
using (SqlConnection Connection = new SqlConnection(ConnectionString))
{
Connection.Open();
Connection.Close();
}
}
catch(Exception E)
{
MessageBox.Show(E.Message);
}
}
}
}
produces:
生产:
Login failed for 'HYDROGEN\Guest'.
登录失败的“氢\客人”。
Edit: It mislead me before, the server log says:
编辑:它误导我之前,服务器日志说:
Login failed for user 'HYDROGEN\Guest'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: workstation's-ip]
用户“氢\客”登录失败。原因:基于标记的服务器访问验证失败,导致基础结构错误。检查以前的错误。(客户端工作站的ip):
1 个解决方案
#1
0
I would start doing following tests in the server.
我将开始在服务器中执行以下测试。
- check the the SQL services are working: SQL Server & SQL Browser services at least
- 检查SQL服务是否工作:至少是SQL Server和SQL浏览器服务
- check that you can connect to the SQL Server from the local station itself. use OSQL or SSMS
- 检查是否可以从本地站点本身连接到SQL服务器。使用OSQL或地对地导弹
- check that the firewall at the Server is Off or allows access to critical SQL Ports like 1433 for TCP protocol and I believe that 445 & 139 for Named Pipes
- 检查服务器上的防火墙是否关闭,或者允许访问关键的SQL端口,如TCP协议的1433,我相信命名管道的445 & 139。
- in SQL Configuration Manager check that you have TCP and Named Pipes enabled (assuming that you are using SQL 2005 and up)
- 在SQL配置管理器中,检查是否启用了TCP和命名管道(假设您正在使用SQL 2005或以上版本)
#1
0
I would start doing following tests in the server.
我将开始在服务器中执行以下测试。
- check the the SQL services are working: SQL Server & SQL Browser services at least
- 检查SQL服务是否工作:至少是SQL Server和SQL浏览器服务
- check that you can connect to the SQL Server from the local station itself. use OSQL or SSMS
- 检查是否可以从本地站点本身连接到SQL服务器。使用OSQL或地对地导弹
- check that the firewall at the Server is Off or allows access to critical SQL Ports like 1433 for TCP protocol and I believe that 445 & 139 for Named Pipes
- 检查服务器上的防火墙是否关闭,或者允许访问关键的SQL端口,如TCP协议的1433,我相信命名管道的445 & 139。
- in SQL Configuration Manager check that you have TCP and Named Pipes enabled (assuming that you are using SQL 2005 and up)
- 在SQL配置管理器中,检查是否启用了TCP和命名管道(假设您正在使用SQL 2005或以上版本)