我在SQL Server上创建了一个用户,但是使用该登录信息我收到了以下消息:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
[SqlException (0x80131904): Login failed for user ''. The user is not associated with a trusted SQL Server connection.]
这是我的连接字符串:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Server=SRV-02;Initial Catalog=OCIS_logins;Integrated Security=True;user id=TEST;password=test" providerName="System.Data.SqlClient"/>
</connectionStrings>
我很抱歉这个可能不好的问题,但我通常与SQL服务器管理员没有任何关系......
我希望你能帮助我。
史蒂夫
答案 0 :(得分:2)
为此网站添加书签http://www.connectionstrings.com它有各种示例
这里是sql server 2005 http://www.connectionstrings.com/sql-server-2005
所以在你的情况下它应该是
connectionString="Server=SRV-02;Initial Catalog=OCIS_logins;user id=TEST;password=test" providerName="System.Data.SqlClient"
答案 1 :(得分:1)
更改集成安全性= True到集成安全性=假