asp.net中用户“domainname \\ username”错误登录失败

时间:2016-10-07 06:20:02

标签: sql-server-2008-r2 windows-authentication

我在连接打开步骤

时遇到以下错误
if (con != null && con.State != System.Data.ConnectionState.Open)
                    con.Open(); //getting error here

消息:用户“domainname \ username”

的登录失败

编号:18456

然后我检查Click here处的解决方案,发现已经选择了SQL Server和Windows身份验证模式,那么问题是什么。

请建议。

1 个答案:

答案 0 :(得分:0)

在connectionString中,Integrated Security值为True。我把它设置为False。它现在正在工作。