SQL Server登录从C#的Web应用程序失败
问题描述:
我创建的SQL Server上的用户,但使用该登录我得到这个消息:SQL Server登录从C#的Web应用程序失败
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服务器管理...
我希望你能帮助我。
史蒂夫
答
更改集成安全性= True以集成安全=假
答
收藏本网站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"
+0
非常感谢您的链接,我将其书签。这里的样本不适合我。 – Steve 2010-02-13 19:23:37
靠近。现在我收到另一条消息: 无法打开登录请求的数据库“OCIS_logins”。登录失败。 用户'OCIS'登录失败。 感谢您的快速帮助。 – Steve 2010-02-13 19:23:07